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
  


Changing user and group ownership page 6 of 23


To change the owner or group of a file or other filesystem object, use chown or chgrp respectively. Each of these commands takes a name followed by one or more filenames.


# chown root /etc/passwd
# chgrp wheel /etc/passwd

You can also set the owner and group simultaneously with an alternate form of the chown command:


# chown root.wheel /etc/passwd

You may not use chown unless you are the superuser, but chgrp can be used by anyone to change the group ownership of a file to a group to which they belong.


Main menuSection menuFeedbackPreviousNext
PrivacyLegalContact