Numeric representation of access modes
Numerically, read access is represented by a value of 4, write permission is represented by a value of 2, and execute permission is represented by a value of 1. The total value between 1 and 7 represents the access mode for each group (user, group, and other).
The following table illustrates the numeric values for each level of access:
Total Value | Read | Write | Execute |
---|---|---|---|
0 | - | - | - |
1 | - | - | 1 |
2 | - | 2 | - |
3 | - | 2 | 1 |
4 | 4 | - | - |
5 | 4 | - | 1 |
6 | 4 | 2 | - |
7 | 4 | 2 | 1 |
When a file is created, the default file access mode
is 755
. This means the user has read, write, and execute
permissions (4+2+1=7)
, the group has read and execute permission (4+1=5)
,
and all others have read and execute permission (4+1=5)
.
To change access permission modes for files you own, run the chmod (change
mode) command.