Tools / Permissions

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.

ModeSymbolicMeaningTypical use
000---------No accessRare; deny all
400r--------Owner readRead-only secret for owner
440r--r-----Owner + group readShared read-only config
444r--r--r--Everyone readPublic read-only file
500r-x------Owner read + executeOwner-only script or dir walk
550r-xr-x---Owner + group rxShared executable / dir
555r-xr-xr-xEveryone rxPublic binary or traversable dir
600rw-------Owner read + writeSSH keys, tokens, .env, private files
640rw-r-----Owner rw, group readLogs or config for a service group
644rw-r--r--Owner rw, everyone readCommon default file
660rw-rw----Owner + group rwShared writable file, no world
664rw-rw-r--Owner + group rw, world readShared file with public read
666rw-rw-rw-Everyone read + writeUsually wrong on multi-user hosts
700rwx------Owner fullHome dirs, ~/.ssh, private scripts
750rwxr-x---Owner full, group rxShared app dir without world
755rwxr-xr-xOwner full, everyone rxCommon directory or public binary
770rwxrwx---Owner + group fullShared project dir, no world
775rwxrwxr-xOwner + group full, world rxShared dir with public traverse
777rwxrwxrwxEveryone fullWorld-writable; avoid unless sticky
1000--------TSticky bit onlyRare alone; see 1777
1777rwxrwxrwtSticky world-writable dir/tmp style: anyone write, only owner delete own
2000------S--Setgid bit onlyRare alone; see 2755 / 2700
2700rwx--S---Setgid + owner fullPrivate setgid directory
2755rwxr-sr-xSetgid + 755Shared dir keeps group; some setgid binaries
4000---S-----Setuid bit onlyRare alone; see 4755
4750rwsr-x---Setuid + 750Privileged binary, group execute only
4755rwsr-xr-xSetuid + 755Runs as file owner; audit carefully