Re: /proc/*/mem weirdness

Andi Kleen (ak@muc.de)
13 Mar 1999 19:59:07 +0100


koenig@tat.physik.uni-tuebingen.de (Harald Koenig) writes:

> using plain Linux 2.2.2 I'd like to read the memory from another process using
>
> # cat /proc/17940/mem
> cat: /proc/17940/mem: No such process
>
> pid 17940 _is_ running and working fine. reading /proc/*/mem fails for
> _every_ PID in my system, except when I try /proc/self/, here I get
>
> # cat /proc/self/mem
> cat: /proc/self/mem: Permission denied
>
>
> what's going on here? of course this all is done as root...

You can only access /proc/*/mem when you ptrace attached the process.

-Andi

-- 
This is like TV. I don't like TV.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/