helpfulstuff.org Logo





Home arrow Linux arrow Managing File and Directory Permissions and Ownership Make Text BiggerMake Text SmallerReset Text Size
Managing File and Directory Permissions and Ownership PDF Print E-mail
Written by Trevor Gontz   

chown

chown (change ownership) is the command used to change ownership of a file or directory

Example:

chown newowner directory (changes owner of a directory)

chown newowner:newgroup directory (changes owner and group)

chown -hR newowner directory (changes owner of directory and all subfiles within the directory)

chgrp 

chgrp (change group) is the command used to change the group that a file or directory belongs to.

chmod

chmod () is the command used to change the permissions on a file or folder. chmod with -R option with change all of the subfolders 

Example:

 chmod 777 directory_name 

To change the permissions on a directory and ALL of the files and folders within it you would use the -R (recursive) options. For example:

If you wanted to change the permissions of a directory named albums to 755 and at the same time change the permissions on all of the folders and files in albums to 755 you would type:

chmod -R 755 albums 
Last Updated ( Wednesday, 01 October 2008 )
 
< Prev   Next >
Linux Links

Major Distributions