Bug #2015

sgid on directories isn't working

lukeshu - over 5 years ago - . Updated over 5 years ago.

% Done:



There are a handful of directories in /srv/repo/main that don't have the sgid bit set, and a whole bunch of files that are :users instead of :repo (not all of which are in the directories without the bit set).

I'm not sure what's causing the sgid bit to be ignored in some cases.


wtf.txt (4.02 KB) wtf.txt lukeshu, 2018-09-27 12:24 AM



Updated by lukeshu over 5 years ago

/srv is mounted with nosuid, which inhibits parts of sgid. Turning that off in /etc/fstab and rebooting...


Updated by lukeshu over 5 years ago

That doesn't seem to have made any difference.

Observation: When I create an SGID directory in my home directory, and create a subdir with in it, the subdir inherits the SGID bit. The same is not true when creating a subdir of an SGID directory in /srv.

Question: Why am I observing different behavior?

A log of a session demonstrating this behavior is attached. The [NNN] bit of my PS1 prompt is the exit status (in decimal) of the previous command.


Updated by bill-auger over 5 years ago

i tried it on winston under /etc and the sguid bit is inherited as expected - the only obvious difference it the nodev mount flag - could the underlying virtual disk have such properties on it?


Updated by lukeshu over 5 years ago

The difference wasn't nodev. It's bsdgroups!

sudo tune2fs -l /dev/vda4 |grep 'Default mount'
Default mount options:    bsdgroups user_xattr acl

Also available in: Atom PDF