Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
check the permissions of the parent directory – steve Jul 11 '12 at 20:10
sorry I didn't include those before. the directory is also readable, and I can ls in the directory. – YenTheFirst Jul 11 '12 at 20:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.