Reading /proc/[nnn]/mem only gives ESRCH or EACCES

From: Scott A Crosby (
Date: Fri Jul 14 2000 - 01:18:43 EST

I'm interested in looking at the memory of a process (running 'strings' on
it.) I expected that '/proc/[nnn]/mem' would be the logical choice to
give me the process image, but it doesn't let me.

If I run 'cat /proc/1/mem' as root, I get an ESRCH. Ditto trying to read
any other process.

If, instead I run 'cat /proc/self/mem', I get EACCES if I'm root or a
non-root user.

If /proc/[nnn]/mem isn't the way to get this information, and it only
gives errors, what good is it?

This seems true for both:

   Linux version 2.0.38 (root@qwe1) (gcc version
             #2 Thu Aug 26 16:35:52 EDT 1999


   Linux version 2.2.16 (root@wilson) (gcc version 2.95.2 20000313 (Debian
             GNU/Linux)) #18 SMP Mon Jun 12 23:22:31 EDT 2000


No DVD movie will ever enter the public domain, nor will any CD. The last CD 
and the last DVD will have moldered away decades before they leave copyright. 
This is not encouraging the creation of knowledge in the public domain.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:19 EST