Chmod calculator
Work out Linux file permissions from boxes, from an octal number or from rwx text.
About Chmod Calculator
Every file on Linux and macOS has a permission setting that says who may read it, change it or run it. It is shown either as a number like 644 or as nine letters like rw-r--r--. This calculator converts between the two in both directions. Tick the boxes and the number updates, or type a number and the boxes follow. A plain sentence under the result spells out what the owner, the group and everyone else can do, and the special bits are included.
- Checking what 640 or 750 really allows before you run it on a server.
- Reading a permission string from an ls listing and turning it into a number.
- Setting upload folders and config files without opening them to everyone.
- Learning how the three digits and the nine letters line up.
How to use Chmod Calculator
Step 1
Tick the permissions for owner, group and others, or type a number such as 755.
Step 2
Read the number, the rwx text and the plain explanation.
Step 3
Copy the chmod command and run it on your file or folder.
Good to know
- A normal website file is 644 and a normal folder is 755. A folder needs the execute bit for people to open it.
- Avoid 777 on a live server. It lets every account on the machine change the file.
- The setuid and setgid bits only matter on programs and shared folders. Leave them off unless you know why you need them.
Common questions
What do the three digits mean?
The first digit is for the owner, the second for the group and the third for everyone else. Each is a sum: read is 4, write is 2 and execute is 1, so 7 means all three and 5 means read and execute.
What is the fourth digit in 1777 or 4755?
It is a leading digit for the special bits. 4 is setuid, 2 is setgid and 1 is the sticky bit, which stops users deleting each other's files in a shared folder.
Does chmod work on Windows?
Not in the same way. Windows uses access control lists. The command is for Linux, macOS, BSD and the Linux layer inside Windows.