0
I have a server with Centos 7 + SELinux in enforcing mode, running several internet services without problems. The problem is that when you run tmux as a non-root user, it doesn't run and shows c1;2 at the next prompt.
But if I can start tmux normally through sudo tmux
I tried adding the user to the tty group editing /etc/group with tty:x:5:username with no results.
I have also run
$strace -fo strace.out -s 2048 tmux , and found the following line indicating permission error.
chown("/dev/pts/1", 996, 5) = -1 EPERM (Operation not permitted)
Then execute:
$ll -Z /dev/pts
crw--w----. username tty system_u:object_r:user_devpts_t:s0 0
c---------. root root system_u:object_r:user_devpts_t:s0 ptmx
$stat /dev/pts
<font color="#ffff00">File: '/dev/pts
Size: 0 Blocks: 0 IO Block: 1024 directory
Device: ch/12d Inode: 1 Links: 2
Access (0755/drwxr-xr-xr) Uid: ( 0/ root) Gid: ( 0/ root)
Context: system_u:object_r:devpts_t:s0
$stat /dev/ptmx :(
File: '/dev/ptmx'.
Size: 0 Blocks: 0 IO Block: 4096 character special file
Device: 5h/5d Inode: 1134 Links: 1 Device type: 5,2
Access (0666/crw-rw-rw-) Uid: ( 0/ root) Gid: ( 5/ tty)
Context: system_u:object_r:ptmx_t:s0
The problem seems to be in the permissions or something related to the SELinux context.
Please. Does anyone have any idea what to do? :)