Changing access permissions using the chmod command

Changing access permissions using the chmod command

To give yourself permission to execute a file that you own:

   chmod u+x file1

This gives you execute permission for the file "file1".


To give members of your group permission to read a file:

   chmod g+r file2

This gives the group permission to read the file "file2".


To give read permission to everyone for a particular type of file:

   chmod a+r *.pub

This gives everyone permission to read all files with the extension .pub.


To give the group write and execute permission:

   chmod g+wx $HOME/SCCS

This gives all members of the group permission to place files in the directory SCCS in your home directory. They can also list (ls) the contents of this directory.


[Home] [Search] [Index] This site maintained by unixhelp@math.rutgers.edu
This page was last updated on September 05, 2006 at 10:29 am and is maintained by webmaster@math.rutgers.edu.
For questions regarding courses and/or special permission, please contact mclausen@math.rutgers.edu.
For questions or comments about this site, please contact help@math.rutgers.edu.
© 2012 Rutgers, The State University of New Jersey. All rights reserved.