Permissions
Common Linux file modes. Owner / group / other. Filter locally. Nothing is posted or fetched.
Octal is owner / group / other. Each digit is r=4 + w=2 + x=1. Leading digit: 4 setuid, 2 setgid, 1 sticky. chmod 600 file · chmod 700 dir.
| Mode | Symbolic | Meaning | Typical use | |
|---|---|---|---|---|
000 | --------- | No access | Rare; deny all | |
400 | r-------- | Owner read | Read-only secret for owner | |
440 | r--r----- | Owner + group read | Shared read-only config | |
444 | r--r--r-- | Everyone read | Public read-only file | |
500 | r-x------ | Owner read + execute | Owner-only script or dir walk | |
550 | r-xr-x--- | Owner + group rx | Shared executable / dir | |
555 | r-xr-xr-x | Everyone rx | Public binary or traversable dir | |
600 | rw------- | Owner read + write | SSH keys, tokens, .env, private files | |
640 | rw-r----- | Owner rw, group read | Logs or config for a service group | |
644 | rw-r--r-- | Owner rw, everyone read | Common default file | |
660 | rw-rw---- | Owner + group rw | Shared writable file, no world | |
664 | rw-rw-r-- | Owner + group rw, world read | Shared file with public read | |
666 | rw-rw-rw- | Everyone read + write | Usually wrong on multi-user hosts | |
700 | rwx------ | Owner full | Home dirs, ~/.ssh, private scripts | |
750 | rwxr-x--- | Owner full, group rx | Shared app dir without world | |
755 | rwxr-xr-x | Owner full, everyone rx | Common directory or public binary | |
770 | rwxrwx--- | Owner + group full | Shared project dir, no world | |
775 | rwxrwxr-x | Owner + group full, world rx | Shared dir with public traverse | |
777 | rwxrwxrwx | Everyone full | World-writable; avoid unless sticky | |
1000 | --------T | Sticky bit only | Rare alone; see 1777 | |
1777 | rwxrwxrwt | Sticky world-writable dir | /tmp style: anyone write, only owner delete own | |
2000 | ------S-- | Setgid bit only | Rare alone; see 2755 / 2700 | |
2700 | rwx--S--- | Setgid + owner full | Private setgid directory | |
2755 | rwxr-sr-x | Setgid + 755 | Shared dir keeps group; some setgid binaries | |
4000 | ---S----- | Setuid bit only | Rare alone; see 4755 | |
4750 | rwsr-x--- | Setuid + 750 | Privileged binary, group execute only | |
4755 | rwsr-xr-x | Setuid + 755 | Runs as file owner; audit carefully |
