$ man chmod
chmod
Linux File Permissions Calculator
File Info
Permissions
Owner
(u) user
Group
(g) group
Other
(o) world
Special Bits
setuid
4000
Run as file owner
setgid
2000
Run as file group
sticky
1000
Only owner can delete
Quick Presets
Output
Octal
0special
·
6owner
·
4group
·
4other
Common Permission Reference
| Octal | Symbolic | Typical Use Case |
| 400 | r-------- | Read-only by owner — private key files (e.g. ~/.ssh/id_rsa) |
| 444 | r--r--r-- | Read-only by everyone — public static assets |
| 600 | rw------- | Read/write owner only — config files with secrets |
| 644 | rw-r--r-- | Default web file — HTML, CSS, JS, images |
| 664 | rw-rw-r-- | Shared project files — group can edit |
| 666 | rw-rw-rw- | Read/write by all — temp files (avoid on web servers) |
| 700 | rwx------ | Private executable — owner-only scripts |
| 711 | rwx--x--x | Execute by all, write/read by owner only |
| 755 | rwxr-xr-x | Default directory / public executable — system binaries |
| 775 | rwxrwxr-x | Shared directory — group can write |
| 777 | rwxrwxrwx | World-writable — dangerous, avoid in production |
| 1777 | rwxrwxrwt | Sticky bit — /tmp style shared directory |
| 2755 | rwxr-sr-x | setgid directory — new files inherit group |
| 4755 | rwsr-xr-x | setuid binary — runs as owner (e.g. /usr/bin/passwd) |
Permission Matrix — What Each Class Can Do
| Action |
Owner (u) |
Group (g) |
Other (o) |
| Read file contents |
|
|
|
| Write / modify file |
|
|
|
| Execute / traverse dir |
|
|
|