What is chmod?
chmod (change mode) is a Unix/Linux command that sets the access permissions for files and directories. Every file on a Unix system has three sets of permissions — one for the owner, one for the group, and one for everyone else (others) — and three permission types: read, write, and execute.
How to Use This Tool
- Click the checkboxes in the grid to enable or disable Read, Write, and Execute for Owner, Group, and Others
- The octal code, symbolic notation, and chmod command update instantly
- Enter your filename in the field to customise the generated command
- Click Copy to copy the command to your clipboard
- Use the preset buttons to jump to common configurations
Octal Notation Explained
Each permission type has a numeric value: Read = 4, Write = 2, Execute = 1. You add them together for each group:
| Permission | Value |
|---|---|
| Read | 4 |
| Write | 2 |
| Execute | 1 |
| None | 0 |
So rwx = 4+2+1 = 7, rw- = 4+2 = 6, r— = 4 = 4, --- = 0.
The three digits in the octal code represent Owner, Group, and Others in that order:
- 755 = Owner: rwx (7), Group: r-x (5), Others: r-x (5)
- 644 = Owner: rw- (6), Group: r— (4), Others: r— (4)
- 600 = Owner: rw- (6), Group: --- (0), Others: --- (0)
Common Permission Settings
| Octal | Symbolic | Common Use Case |
|---|---|---|
| 755 | rwxr-xr-x | Directories, executable scripts |
| 644 | rw-r—r— | Regular files, web assets |
| 600 | rw------- | SSH private keys, private config files |
| 400 | r-------- | Read-only write-protected config files |
| 700 | rwx------ | Private directories, personal scripts |
| 777 | rwxrwxrwx | Avoid — full access for everyone |
Symbolic vs Octal Notation
chmod accepts both formats:
chmod 755 myfile # octal
chmod u=rwx,go=rx myfile # symbolic
The symbolic form uses u (user/owner), g (group), o (others), and a (all), combined with =, +, or - to set, add, or remove permissions. The octal form is shorter and common in scripts.
Security Considerations
- Never use 777 on files served by a web server — it allows anyone to modify your files
- SSH private keys must be 600 or the SSH client will refuse them with a “permissions too open” error
- Others write (octal ends in 2, 3, 6, or 7) means any user on the system can overwrite your file — almost never intended
- setuid/setgid bits (4-digit octal like 4755) are not covered by this tool; avoid them unless you know exactly what you are doing
Privacy
All calculations are performed entirely in your browser using JavaScript. No file names, permission values, or any other data are ever sent to a server.