[OmniOS-discuss] /usr/bin/chmod and the set-gid-bit

Tobias Oetiker tobi at oetiker.ch
Wed Aug 7 15:43:19 UTC 2013


Hi,

/usr/bin/chmod seems to ignore the set-group-id bit when called
with an octal permission string. try this on a zfs filesystem

  export PATH=/usr/bin
  umask 022
  mkdir gd
  ls -ld gd
  chmod 2770 gd
  ls -ld gd
  chmod g+s gd
  ls -ld gd
  chmod 0770 gd
  ls -ld gd

running this with truss reveals that I should call

  chmod 042770 gd

instead, and indeed it works I just don't know why ... the man page
does not provide any insight into this behaviour ...

ah and btw, /usr/gnu/bin/chmod work the way legacy unix tools do :-)

can someone please enlighten me ?

cheers
tobi

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900


More information about the OmniOS-discuss mailing list