Sunday, April 19, 2009

Why SGID bit?

Who ever creates the files/directories on /mygrpdir group owner should be 

automatically should be the same group owner of /mygrpdir. 


1.     chmod g+s /mygrpdir

2.     Verify using: ls -ld /mygrpdir 

Permission should be like: 

drwxrws--- 2 root sysusers 4096 Mar 16 18:08 /mygrpdir 


If SGID bit is set on directory then who every users creates the files on directory group 

owner automatically the owner of parent directory. 

 

To set the SGID bit: chmod g+s directory 

To Remove the SGID bit: chmod g-s directory 

No comments:

Post a Comment