Chmod Calculator
Tick read, write and execute for owner, group and others: the octal mode, the rwx letters and the chmod command, both ways round.
Runs entirely in your browser. Nothing is uploaded, logged or stored.
Symbolic notation
rwxr-xr-x
- Octal notation
- 755
- Command
- chmod 755 file
- Owner
- read, write, execute
- Group
- read, execute
- Others
- read, execute
- Special bits
- none
Tick what the owner, the group and everyone else may do with a file, or type a mode such as 644 or rw-r--r--, and this gives the other notation and the chmod command to run.
How it works
Each class of user has three permissions, and each permission is worth a number: read 4, write 2, execute 1. A digit is their sum, so 7 is all three, 5 is read and execute, 4 is read alone. The three digits are the owner, the group and others, in that order.
The letters say the same thing nine characters at a time: r, w and x where a permission is granted and a dash where it is not, so 755 is rwxr-xr-x.
A fourth digit in front holds the special bits: 4 for setuid, 2 for setgid, 1 for the sticky bit. They show in the execute position — s or t when execute is also granted, S or T when it is not.
Examples
| Case | Input | Result |
|---|---|---|
| A script or a directory | 755 | rwxr-xr-x: the owner does everything, everyone else reads and executes |
| An ordinary file | 644 | rw-r--r--: the owner reads and writes, everyone else reads |
| A shared directory such as /tmp | 1777 | rwxrwxrwt: everyone writes, but only a file's owner deletes it |
Frequently asked questions
What does chmod 755 mean?
The owner can read, write and execute; the group and everyone else can read and execute but not write. It is the usual mode for a directory or a program.
Why does a directory need execute?
On a directory, read lets you list the names in it and execute lets you enter it and reach the files inside. Without execute, a readable directory shows its names and nothing more.
Is chmod 777 safe?
It lets every user on the system change or replace the file. On a shared server or a web root that is rarely what was meant; the usual answer is 755 for directories and 644 for files, with the right owner.
Good to know
- This covers the mode bits that chmod sets and ls -l shows. Access control lists, and the attributes some file systems add on top, can grant or deny more than the mode says, and are not shown here.