chmod with Numbers
755, 644 and 600.
Online, you'll often see commands like CH mod seven five five. Those numbers look magical, but they're just simple arithmetic. Each permission has a value.

- chmod 755?
- Looks magical
- Just simple arithmetic
The values
Read is worth four. Write is worth two. Execute is worth one. Add up the permissions you want, and you get a single digit. Seven is four plus two plus one, which is everything. Five is four plus one, read and execute. Six is four plus two, read and write.
Three digits, three groups
Three digits set all three groups at once. Owner first, then group, then others. CH mod six four four gives RW, R, R. Seven five five gives RWX, RX, RX. And six hundred makes a file completely private.
chmod 644 notes.txt && ls -l notes.txt -rw-r--r-- 1 sam sam 30 Jan 5 09:00 notes.txt chmod 755 projects/scripts/hello.sh && ls -l projects/scripts/hello.sh -rwxr-xr-x 1 sam sam 40 Jan 5 09:00 projects/scripts/hello.sh chmod 600 todo.txt && ls -l todo.txt -rw------- 1 sam sam 58 Jan 5 09:00 todo.txt
Numbers you will meet
These four numbers cover almost everything. Six four four for normal files. Seven five five for scripts, programs, and folders. Six hundred for private files, like SSH keys. And seven hundred for private folders. If you ever see seven seven seven, be suspicious. It lets anyone change the file.
| Number | Letters | Used for |
|---|---|---|
| 644 | rw-r--r-- | normal files |
| 755 | rwxr-xr-x | scripts, folders |
| 600 | rw------- | private files, keys |
| 700 | rwx------ | private folders |
| 777 | rwxrwxrwx | almost never! |
Summary
Four for read, two for write, one for execute. Add them up for each group. Six four four, seven five five, and six hundred cover most needs. Next, running your own script.
Key takeaways- r4 w2 x1
- 644 / 755 / 600
- Avoid 777