0

On one of my servers running Debian 7.8, when I run ps aux, I only see processes belonging to the current user.

If I check the permissions with sudo ls -al /proc/, procesess run by root have theses permissions: dr-x------ Whereas on my other Debian boxes, I have this: dr-xr-xr-x

Do you know what could cause this and how I can change it?

2 Answers 2

1

It is most likely the 'hidepid' option to the mounted /proc filesystem.

Check grep proc /proc/self/mounts. If hidepid=1 or hidepid=2, remove the mount option and try again.

1
  • Thanks for your suggestion, but I don't have a hidepid option: proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
    – Rudloff
    Jul 16, 2015 at 20:49
0

You could try setting the hidepid=0 in /etc/fstab just to see what happens. Add this line to /etc/fstab and reboot.

proc /proc proc rw,nosuid,nodev,noexec,relatime,hidepid=0

It would be interesting to see if the problem persists with hidepid actually set to zero.

Running debian 7.8 with the above stanza in /etc/fstab "mount | grep -i proc" does not show hidepid option actually set to 0.

If I set it to 1, then the hidepid option is shown

morgan@debian:~$ mount | grep -i proc
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime,hidepid=1)

However, even with "hidepid=1", and "ps aux" only showing the procesess for the current user, permissions for the /proc/PID directories are still 555 not 500.

root@debian:/proc# mount | grep -i proc
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime,hidepid=1)
root@debian:/proc# ls -al | head
total 4
dr-xr-xr-x 80 root        root                      0 Jul 26 14:33 .
drwxr-xr-x 23 root        root                   4096 Jul 26 08:43 ..
dr-xr-xr-x  8 root        root                      0 Jul 26 14:33 1
dr-xr-xr-x  8 root        root                      0 Jul 26 14:33 10
dr-xr-xr-x  8 root        root                      0 Jul 26 14:33 108
dr-xr-xr-x  8 root        root                      0 Jul 26 14:33 11
dr-xr-xr-x  8 root        root                      0 Jul 26 14:33 110
dr-xr-xr-x  8 root        root                      0 Jul 26 14:33 119
dr-xr-xr-x  8 root        root                      0 Jul 26 14:33 12

A similar question was asked here, for ubuntu 10.04

http://ubuntuforums.org/showthread.php?t=2173093

However, even running ubuntu 10.04 with kernel 2.6, the /proc/PID permissions were still 555, not 500.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .