On Thu, 30 Jan 2003, Rigler, S C (Steve) wrote:

> I guess I must have an evil vi on all of my machines, because I've been
> doing this for some time (using ":w!" to override read-only permission
> when I own the file).

The problem is that if you have write permissions on the directory, you 
can add and delete directory entries regardless of the permissions on the 
file itself.

Some editors (vi is a good example) don't edit the actual file; they edit
a temporary copy the way all good multi-user utilities should. If you do a
":w!" and you have sufficient privelege for the directory, it can unlink
the file and move the temporary data to a new file with the old name and
permissions.

It only *looks* like it's over-writing the old file. It isn't. But the end 
result is the same.

-- 
"Of course I'm in shape! Round's a shape, isn't it?"



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to