The setgid bit on programs When a program with the setgid bit set is run, it runs with an 'effective' gid of the group of the file # cp /usr/bin/id ./setxid # ls -l setxid -rwxr-xr-x 1 root root 13052 Apr 19 4:43 setxid # chgrp web setxid # chmod u+s setxid # ls -l setxid -rwxr-sr-x 1 root web 13052 Apr 19 4:43 setxid $ /usr/bin/id uid=1010(bri) gid=1010(bri) groups=1010(bri) $ ./setxid uid=1010(bri) gid=1010(bri) egid=0(web) groups=1010(bri)