Skip to content

Comment on Delete files owned by root, without being root

Comments

If you leave a locked safe in my locked house, I cannot open the safe but I can easily dispose of it. I would argue that this behavior is intuitive.

Yes, I'm not sure why this is surprising, since the write bit refers to modification of the file itself, whereas the ability to create (or delete) files in a directory is related to the write permissions for the directory.

EDIT: NelsonMinar explains this better in his comment, but if you think of the inodes, not the files, this behavior makes perfect sense.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.