Syntax: chmod xxx file
xxx - 3 digit octal permission value
file - the path/file to change permissions
The permissions for each user is represented by an octal value. Each type of permission has value:
Read - r | Write - w | Execute - x/cd |
4 | 2 | 1 |
Put the three flags together in combination to yield the octal number from 0 to 7. For example, read (4) and execute (1) permissions together are represented by 5 (4+1). Here is a table representing all of the possible values:
Octal Value | Read | Write | Execute |
7 | r | w | x |
6 | r | w | - |
5 | r | - | x |
4 | r | - | - |
3 | - | w | x |
2 | - | w | - |
1 | - | - | x |
0 | - | - | - |
So a 0750 or 750 means:
- owner has rwx access
- group has rw access
- others have no access
Note: The first 0 in the octal values above represent the sticky bits for set UID and set GID.
previous page
|