[sf-lug] File Permissions - surprises

Michael Paoli Michael.Paoli at cal.berkeley.edu
Wed Jun 8 06:59:17 PDT 2022

> From: "Ronald Barnes" <ron at ronaldbarnes.ca>
> Subject: Re: [sf-lug] File Permissions - surprises
> Date: Tue, 7 Jun 2022 20:58:55 -0700

> Michael Paoli wrote on 2022-06-07 19:53:
>> Been there, done that.
>> https://www.mpaoli.net/~michael/linux/permissions.html
> Well, *that* was interesting and informative.
> During the podcast, I was surprised that a user with no user nor  
> group permissions at all on a file can move / rename the file.
> Turns out, that action is dependent on the directory's permissions.

Remember that a directory is (mostly) just another type of file,
and that file contains the names by which the links in it are known,
and for each its inode number.  Think of and remember that,
then directory permissions start to make a lot more sense.
And, for bonus, add to that how the sticky and SGID bits behave on
directories (interestingly, historically they did nothing
on directories ... so, well, that "nothing" got turned into being able to
do something useful and relatively logical).

> Thanks for the info, Michael.  Bookmarked.

More information about the sf-lug mailing list