A regular user cannot read / proc / net / dev

I'm sure something is missing here, but I'm not sure what it is:

Here is what the root can see:

root@opteron16:/# ls -l | grep proc
dr-xr-xr-x 290 root root     0 2012-01-14 02:03 proc
root@opteron16:/# ls -l proc | grep net
lrwxrwxrwx  1 root       root        8 2012-01-21 03:29 net -> self/net
root@opteron16:/# ls -l proc/net/ | grep dev
-r--r--r-- 1 root root 0 2012-01-14 02:05 dev

This is a ganglia user:

root@opteron16:/# cat /etc/passwd | grep ganglia
ganglia:x:111:119:Ganglia Monitor:/var/lib/ganglia:/bin/false

When I try to access / proc / net / dev with this user:

root@opteron16:/# su -s /bin/bash ganglia
ganglia@opteron16:/$ ls -l /proc | grep net
lrwxrwxrwx  1 root    root     8 2012-01-21 19:49 net -> self/net
ganglia@opteron16:/$ ls -l /proc/net/
ls: reading directory /proc/net/: Invalid argument
total 0
ganglia@opteron16:/$ cat /proc/net/dev
cat: /proc/net/dev: No such file or directory

It would be great not to feel this stupid :).


Edit

This is what I noticed, and I have never seen such behavior before:

root@opteron16:/proc# ls -l | grep "self -"
lrwxrwxrwx  1 root       root       64 2012-01-22 00:01 self -> 29095
root@opteron16:/proc# ls -l | grep "self -"
lrwxrwxrwx  1 root       root       64 2012-01-22 00:01 self -> 29097
root@opteron16:/proc# ls -l | grep "self -"
lrwxrwxrwx  1 root       root       64 2012-01-22 00:01 self -> 29099
+5
source share
2 answers

Most likely, this is due to the fact that the kernel was compiled using grsec. i.e.

$ uname -a
Linux xxxx 3.2.13-grsec-xxxx-grs-ipv6-64 #1 SMP Thu Mar 29 09:48:59 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I saw this on servers hosted in ovh, since this is the default kernel that they install for you to enable netboot through their administration tools.

To summarize, you can do one of the following:

  • root (+1 ovh!)
  • ​​ubuntu
  • - ( )
+9

ubuntu

, - chroot'd ?

cat /proc/self/net/dev ""?

0

All Articles