3 ms·
I thought the reason the file could be written or deleted by the user was that it had no permissions set... wouldn't this not work if root chmodded little-rock
by code_duck 9y ago
I thought the reason the file could be written or deleted by the user was that it had no permissions set... wouldn't this not work if root chmodded little-rock to 600?
- LukeShu 9y agoNo. This would have worked the same if it were chmod 600. The point of chmod 000 was to say that clearly nobody has any any permissions to do anything directly on the file; that the permissions on the file must have nothing to do with it.
- code_duck 9y agoOkay, so deleting or renaming a file is considered a change of the directory information. Therefore, a user's ability to do that to a file is dependent upon the directory's permissions. And one can avoid that by setting the immutable bit. Got it... I think i was distracted by the parable.