Question

I just found out that the /proc/$pid/mem file permissions are set to read/write for the owner. Why? Does that mean that the owner can write to process memory as it runs live?

(For the record, I haven't been able to open, print or write to the contents of that file for any process I launch yet, via various means).

So why is that some of the contents in /proc are actually modifiable? Is this deliberate, or something overlooked by the Linux devs?

Much appreciated.

Was it helpful?

Solution

/proc is a directory-based view of information the kernel makes available to you.

Yes ... you can change it.

see this example :

echo "1" > /proc/sys/net/ipv4/ip_forward

you could use sysctl to configure these kernel items.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top