0

I have a problem with the server running on CentOS. CentOs has been upgraded to version 6.4 and has all updates. Updates were made according to the official repositories. On the server running the V-Server.

Local /fstab

------------------------------------FSTAB------------------------------------------

Device           Mountpoint  FStype   Options                  Dump Pass

/dev/sda1        /boot       ext3     rw,noatime               1    2
/dev/vg0/root    /           ext3     rw,noatime               1    1
/dev/vg0/swap    none        swap     sw                       0    0
/dev/vg0/usr     /usr        ext3     rw,noatime               1    2
/dev/vg0/var     /var        ext3     rw,noatime               1    2
/dev/vg0/log     /var/log    ext3     rw,noatime               1    2
/dev/vg0/tmp     /tmp        ext3     rw,noatime,nosuid,noexec 1    2
/dev/vg0/home    /home       ext3     rw,noatime               1    2
/dev/vg0/vz      /vservers   ext3     rw,noatime               1    2
tmpfs            /dev/shm    tmpfs    defaults                 0    0
devpts           /dev/pts    devpts   rw,gid=5,mode=620        0    0
sysfs            /sys        sysfs    defaults                 0    0
proc             /proc       proc     defaults                 0    0

The problem is with /dev/pts/ptmx

root@Hostname #/dev/pts > ls -la <br>
total 0<br>
drwxr-xr-x  2 root       root      0 Sep 12 12:34 .
drwxr-xr-x 18 root       root   3860 Sep 12 12:34 ..
crw--w----  1 mmichalski tty  136, 0 Sep 12 12:53 0
c---------  1 root       root   5, 2 Sep 12 12:34 ptmx

As you can see it has no rights. The same situation is running virtual. Below is the fstab file virtual

fstab on virtual running on Vserver

none    /proc           proc    defaults                0 0
none    /tmp            tmpfs   size=16m,mode=1777      0 0
none    /dev/pts        devpts  gid=5,mode=620          0 0

What can cause this problem and where to look for solutions?

Gryu
  • 479
  • 1
  • 6
  • 14
spy86
  • 11
  • 3

1 Answers1

1

Default mode for ptmx nodes is 0000. See the man mount and search for ptmxmode. You can verify your mount options by mount.

For my machine (not CentOS)

$ mount | grep devpts
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)

Then indeed the mode is 0000.

$ ls -l /dev/pts/ptmx 
c--------- 1 root root 5, 2 Sep  6 10:13 /dev/pts/ptmx

However, /dev/ptmx is the one which is important and it gets created by udev.

$ grep -ri ptmx /usr/lib/udev/*
/usr/lib/udev/rules.d/50-udev-default.rules:SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666"

$ ls -l /dev/ptmx
crw-rw-rw- 1 root tty 5, 2 Sep 12 13:58 /dev/ptmx