Unix File Permissions
Reference Unix permission numbers, symbolic permissions, and common chmod modes like 644, 755, and 777.
1st digit: Owner
2nd digit: Group
3rd digit: Others
Read = 4
Write = 2
Execute = 1
Permission Values
| Value | Symbolic | Binary | Meaning | Read | Write | Execute |
|---|---|---|---|---|---|---|
| 0 | --- | 000 | No permissions | No | No | No |
| 1 | --x | 001 | Execute only | No | No | Yes |
| 2 | -w- | 010 | Write only | No | Yes | No |
| 3 | -wx | 011 | Write and execute | No | Yes | Yes |
| 4 | r-- | 100 | Read only | Yes | No | No |
| 5 | r-x | 101 | Read and execute | Yes | No | Yes |
| 6 | rw- | 110 | Read and write | Yes | Yes | No |
| 7 | rwx | 111 | Read, write, and execute | Yes | Yes | Yes |
Common Modes
| Mode | Symbolic | Owner | Group | Others | Common Use |
|---|---|---|---|---|---|
| 644 | rw-r--r-- | Read/write | Read only | Read only | Regular public files, such as HTML, CSS, images, and config files. |
| 600 | rw------- | Read/write | None | None | Private files, secrets, SSH config, and sensitive local files. |
| 755 | rwxr-xr-x | Read/write/execute | Read/execute | Read/execute | Directories and executable scripts that others can access but not modify. |
| 700 | rwx------ | Read/write/execute | None | None | Private directories and executable scripts only the owner should access. |
| 664 | rw-rw-r-- | Read/write | Read/write | Read only | Shared group-writable files. |
| 775 | rwxrwxr-x | Read/write/execute | Read/write/execute | Read/execute | Shared group-writable directories and executable project folders. |
| 777 | rwxrwxrwx | Read/write/execute | Read/write/execute | Read/write/execute | Fully open permissions. Usually unsafe except for temporary/testing cases. |