Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Linux : Education - Tutorials
LPI certification 101 exam prep, Part 3
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
3. The Linux permissions model
  


Directories and sgid page 21 of 23


And, if a directory has the 'sgid' flag enabled, any filesystem objects created inside it will inherit the group of the directory. This particular feature comes in handy when you need to create a directory tree to be used by a group of people that all belong to the same group. Simply do this:


# mkdir /home/groupspace
# chgrp mygroup /home/groupspace
# chmod g+s /home/groupspace

Now, any users in the group mygroup can create files or directories inside /home/groupspace and they will be automatically assigned a group ownership of mygroup as well. Depending on the users' umask setting, new filesystem objects may or may not be readable, writable or executable by other members of the mygroup group.


Main menuSection menuFeedbackPreviousNext
PrivacyLegalContact