Ralf Corsepius wrote:
On Wed, 2005-07-13 at 10:10 -0500, Mike McCarty wrote:
Paul Howarth wrote:
On Wed, 2005-07-13 at 01:46 -0500, Mike McCarty wrote:
I don't understand why echo should be able to write a file that
an editor cannot.
Some editors like to rename the original file to "filename~" and then
write out a new file "filename". This won't work in /proc.
Paul.
I don't use *that* editor. I never have used that one.
Are you sure? Many editors open files like this.
Yes, I am sure. I built it from source myself, and am *very* familiar
with its behavior, having used it for over 10 years, and been the
maintainer of my copy of it over that period of time.
Interesting that one
can delete but not rename the file, even as owner. How is that accomplished?
It's ordinary permissions on files and directories:
# ls -ld /proc/sys/vm/swappiness
-rw-r--r-- 1 root root 0 Jul 13 17:13 /proc/sys/vm/swappiness
# ls -ld /proc/sys/vm
dr-xr-xr-x 2 root root 0 Jul 13 17:13 /proc/sys/vm
Note the owner permissions.
Indeed. I should have thought of that. I often use sort of "lazy thinking"
about root privilege, and should have thought to look at the directory.
[chanting]
"'Root' does not mean 'can do everything', 'root' does not mean 'can do
everything', ..."
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!