The CHMOD command allows you to set certain permissions for files on your Web server.
The 3 numbers do mean something: The first number sets the permissions for the owner, the second sets the permissions for the group, and the last number sets the permissions for anyone else (all others). Look at the table below to see what each number means:
Number | Permission(s) |
---|---|
0 | No Permissions (the user cannot do anything) |
1 | Execute Only (the user can only execute the file) |
2 | Write Only (the user can only write to the file) |
3 | Write and Execute Permissions |
4 | Read Only |
5 | Read and Execute Permissions |
6 | Read and Write Permissions |
7 | Read, Write and Execute Permissions |
Placing 7 in all three positions means that everyone in every group can read, write and execute the file. That is how we get the number 777 for this.
For example: If you use chmod 650:
The first number, 6 gives the owner (you) read and write permissions.