Re: [DNG] Question: Why does "mkdir -p" produce unexpected file permissions and group

2020-01-25 Thread Simon Hobson
Stefan Krusche wrote: > What is the difference between "below /usr/local" > and "in /usr/local" for directory "/usr/local/something"?! (as referred > to in this section of the debian policy.) AIUI, "in" means those items that are directly within the directory, while "below" means those items wi

Re: [DNG] Question: Why does "mkdir -p" produce unexpected file permissions and group

2020-01-25 Thread Stefan Krusche
Resending to list, cause I got this message privately… a...@bastelmap.de 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 >

Re: [DNG] Question: Why does "mkdir -p" produce unexpected file permissions and group

2020-01-25 Thread Stefan Krusche
Am Samstag, 25. Januar 2020 schrieb Florian Zieboll: > very probably the parent directory is assigned to the "staff" group > and has this bit set as well: It's called SGID-bit and recursively > sets the group ID according to the directory owner instead of the > current user - see man (1) chmod. Ha

Re: [DNG] Question: Why does "mkdir -p" produce unexpected file permissions and group

2020-01-25 Thread Florian Zieboll
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On Sat, 25 Jan 2020 13:27:10 +0100 Stefan Krusche wrote: > 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

Re: [DNG] Question: Why does "mkdir -p" produce unexpected file permissions and group

2020-01-25 Thread Stefan Krusche
Am Samstag, 25. Januar 2020 schrieb Stefan Krusche: > Why does group get the 's' bit and becomes 'staff'? Is this normal? > If yes, where is it documented? Okay, I think I found it. In: /usr/share/doc/debian-policy/policy.html/ch-opersys.html#s9.1.2 the last paragraph says this: "The /usr/local

[DNG] Question: Why does "mkdir -p" produce unexpected file permissions and group

2020-01-25 Thread 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: