What every chmod number means — the digit table and the common values like 644 and 755, explained.
| Octal | Symbolic | Permissions |
|---|---|---|
| 0 | --- | No permission |
| 1 | --x | Execute only |
| 2 | -w- | Write only |
| 3 | -wx | Write + execute |
| 4 | r-- | Read only |
| 5 | r-x | Read + execute |
| 6 | rw- | Read + write |
| 7 | rwx | Read + write + execute |
| Value | Symbolic | Typical use |
|---|---|---|
| 644 | rw-r--r-- | Files: owner edits, everyone else reads |
| 755 | rwxr-xr-x | Folders & scripts: owner full control, others read/run |
| 600 | rw------- | Private files: only the owner can read or write |
| 700 | rwx------ | Private folders: only the owner has access |
| 664 | rw-rw-r-- | Group-editable files |
| 775 | rwxrwxr-x | Group-editable folders |
| 640 | rw-r----- | Owner edits, group reads, others nothing |
| 666 | rw-rw-rw- | Everyone can read & write (rarely safe) |
| 777 | rwxrwxrwx | Everyone can do everything (avoid) |
A Unix permission like 755 is three digits, one each for the owner, the group, and everyone else. Each digit is the sum of three values: read = 4, write = 2, execute = 1. Add them up to get the digit — read + write + execute is 4 + 2 + 1 = 7, read + execute is 4 + 1 = 5, read only is 4. So 755 means the owner can read, write and execute (7), while the group and others can read and execute but not write (5). Once you internalise 4-2-1, you can read any permission at a glance.
In practice you reach for a handful. 644 is the standard for files — you can edit them, everyone else can read them. 755 is the standard for directories and executable scripts, since directories need the execute bit to be entered. 600 locks a file to just its owner, which is what SSH expects for private keys. Be wary of 777: it lets anyone read, write and execute, and is almost never the right answer despite being a tempting quick fix. The execute bit means "run this" for a file but "enter this" for a directory — a common source of confusion. For the commands themselves, see the Linux commands.