If you wish to change the permissions of a file or directory, you can use the chmod (change mode) command. The chmod command uses a number code. Each permission setting corresponds to a number between 0 and 7. For each file or directory, you assign three numbers between 0 and 7.
The first number gives the permissions for the owner.
The second number gives the permissions for the owner's group.
Note: On Uniform Access accounts the group permission has no meaning because all users belong to the same group and no other groups can be formed.
The third number gives the permissions for all others.
The following shows how the permissions correspond to each number code:
7 Read, Write, and Execute (rwx)
6 Read and Write only (rw-)
5 Read and Execute only (r-x)
4 Read only (r--)
3 Write and Execute only (-wx)
2 Write only (-w-)
1 Execute only (--x)
0 No Permissions (---)
To change the permissions of a file, enter:
chmod code file