From LXF Wiki



A Shell command that allows the user to change file permissions for a given file/directory (they are treated the same in Unix/Linux systems). It is exceptionally powerful and allows you to change read/write permissions for the following 3 categories. Owner of the file. Group owner of the file. Other potential users of the file.


Example 1

chmod 777 anygiven.filedirname

Would allow anyone in the three groups to be able to access your files. It is equivalent to writing

chmod a=rwx anygiven.filedirname

Example 2

chmod 700 anygiven.filedirname

Would allow the Owner of the file rwx permissions but no-one else.

Test it on a file, individual rwx values can be set purely by changing the values 0-7 for each group. You can see read/write permissions within a file for all ownership permissions by typing

ls anygiven.filedirname -g

Flags and Options