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 system@gantep.edu.tr