| Read (4) | Write (2) | Execute (1) | Value | |
|---|---|---|---|---|
| Owner (u) | 7 | |||
| Group (g) | 5 | |||
| Others (o) | 5 |
chmod 755 filename
Unix file permissions are represented by three sets of permissions for owner, group, and others. Each set has three permissions: read (r), write (w), and execute (x).
The numeric value is calculated by adding: 4 (read) + 2 (write) + 1 (execute). For example, 7 = 4+2+1 (rwx), 5 = 4+1 (r-x), 6 = 4+2 (rw-).