I'm setting up a Linux application which interfaces with programs designed to talk to a serial port. What's strange is that while I can access the pty by symlink if I am the owner user (klipper
), I can't if I'm not, even if the other user (octoprint
) is in the pty's owning group.
For context, the symlink is at /tmp/printer
and the pty is at /dev/pts/1
. SELinux is not installed and mount options are tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
$ ls -l /tmp/printer
lrwxrwxrwx 1 klipper klipper 10 Oct 19 21:30 /tmp/printer -> /dev/pts/1
$ ls -l /dev/pts/1
crw-rw---- 1 klipper tty 136, 1 Oct 19 22:41 /dev/pts/1
$ groups klipper
network tty uucp klipper
$ sudo -u octoprint picocom /tmp/printer
<...>
FATAL: cannot open /tmp/printer: Permission denied
$ sudo -u octoprint picocom /dev/pts/1
<...>
Terminal ready