:: Re: [DNG] Question: Why does "mkdir…
Inizio della pagina
Delete this message
Reply to this message
Autore: Stefan Krusche
Data:  
To: dng
Oggetto: Re: [DNG] Question: Why does "mkdir -p" produce unexpected file permissions and group
Resending to list, cause I got this message privately…

andi@??? schrieb am 25.01.2020 13:50:
> Am Samstag, 25. Januar 2020 schrieb Stefan Krusche:
> > Good day everyone,
> >
> > I observed this behaviour of "mkdir" under /usr/local/:
> >
> > $ sudo mkdir -p share/doc/subversion-book-en
> > $ ls -l -d share/doc/subversion-book-en
> > drwxr-sr-x 2 root staff 4096 Jan 25 13:10
> > share/doc/subversion-book-en
> >
> > The same happens in a root shell. I rather expected to get this:
> > drwxr-xr-x 2 root root …
> >
> > Why does group get the 's' bit and becomes 'staff'? Is this normal?
> > If yes, where is it documented?
>
> Because /usr/local is group staff and has setgid bit set


Yes, that's it, thank you, Andi.

Stefan