I'm trying to write a script that examines memory usage for running processes. To do this, it needs to read /proc/*/smaps files.
Processes owned by root have the permission set to '-r--r--r--', which should be readable by everyone, right?
example output of ls -l [EDIT: now with directory permissions]
ls -l /proc/939/smaps -r--r--r-- 1 root root 0 2012-07-11 12:11 /proc/939/smaps ls -ld /proc/939/smaps -r--r--r-- 1 root root 0 2012-07-11 12:11 /proc/939/smaps
attempt to read:
cat /proc/939/smaps cat: /proc/939/smaps: Permission denied
is there something obvious I'm missing here?
EDIT2: On further investigation, other files, such as /proc//cmdline, are readable, so it might just be a special case for the smaps file?