Chmod Calculator
Generate Unix file permission strings and numeric chmod values.
File Permissions
Owner
Group
Others
Result
About the Chmod Calculator
The Chmod Calculator turns Unix file permissions into the octal number and symbolic string that chmod expects. Tick read, write and execute for the owner, the group and everyone else, or type an octal value like 755 and let it set the boxes.
Each permission has a value: read is 4, write is 2 and execute is 1. The three digits of an octal mode are the totals for owner, group and others. So 755 means the owner gets 4+2+1 (full access), the group gets 4+1 (read and execute) and everyone else gets the same.
Directories need execute as well as read to be entered, which is why 755 is the normal mode for a folder and 644 for a file. Anything ending in 7 for others, such as 777, gives every user on the system write access, and is almost never what you want on a server.
Common questions about Chmod Calculator
What do the three digits mean?
The first is the owner, the second the group, the third everyone else. Each digit sums read (4), write (2) and execute (1).
What is chmod 755?
Owner read, write and execute; group read and execute; others read and execute. The usual mode for directories and executable scripts.
What is chmod 644?
Owner read and write; group and others read only. The usual mode for ordinary files such as HTML pages and images.
Why is 777 considered unsafe?
It lets any user on the machine write to the file or directory. On a shared server that is an invitation for someone to replace your code.
What is the leading fourth digit for?
It carries setuid, setgid and sticky bits, as in 4755 or 1777. This calculator works on the three-digit mode; add the fourth digit yourself if you need it.
How do I apply the result?
Run chmod 755 filename in a terminal, or chmod -R 755 directory to apply it recursively.