Introduction
chmod is a standard Unix/Linux command that allows you to change the permissions of a file/directory. If you do not understand permissions, see the Reading File/Directory Permissions guide before continuing.
Using chmod
There are two arguments for chmod: the permissions and the file/directory name. The permission argument for chmod is based on numbers.
1 stands for execute.
2 stands for write.
4 stands for read.
To set more than one permission on a file/directory, you just add up the permissions. For example, 7 means read, write, and execute permissions. Chmod takes the permissions as the first argument in the order user, group, global. Thus, the command chmod 777 hello will change the permissions of the file hello to read, write and execute by user, group, and everyone else.
Note: To change the permissions of a file/directory, you must be the owner of that file/directory. However, root can change permissions on any file/directory.






