chmod Calculator
Tick read, write and run for the owner, group and everyone else, or type an octal number such as 755, or a symbolic form such as rwxr-xr-x. All the fields stay in step.
| Read | Write | Run or enter | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Everyone else |
Default permissions from a umask
Worked examples
755
Octal 755
rwxr-xr-x
Owner: read, write, execute. Group and others: read and execute.
4755
Octal 4755
rwsr-xr-x
The s in the owner execute place is the setuid bit with execute.
Change 644 with u+x
644 and u+x
744
Adds execute for the owner only.
About chmod Calculator
On Linux, macOS and other Unix-like systems, every file and folder has permissions for three groups of people: the owner, the group and everyone else. Each group can have permission to read, write and execute. The chmod command sets them, either with a number such as 755 or with letters such as u+x, and it is easy to forget which digit is which.
Tick the boxes and the octal number, the symbolic form, the form shown by ls -l and the chmod command appear together, with a plain description of what each group can do. You can also type any of these to see the boxes and description change, or enter a change such as u+x,go-w to apply to the current setting. A umask section shows what permissions new files and folders will get for a given umask.
How to use chmod Calculator
- Tick the permissions for the owner, the group and everyone else.
- Or type the octal value, the symbolic value or a change expression.
- Read the description and copy the command.
- Use the umask box to see default permissions for new files and folders.
Common uses
- Setting the right permissions on a web server folder
- Understanding a number from a tutorial or a log
- Fixing a script that will not run
- Choosing a umask for a shared folder
Frequently asked questions
How does octal permission work?
Read is 4, write is 2 and execute is 1. Add the ones you want for each group. For example 7 is read, write and execute, 5 is read and execute, and 4 is read only, so 755 gives the owner everything and the others read and execute.
What do setuid, setgid and the sticky bit do?
Setuid makes a program run as the file owner, setgid makes it run as the file group, or makes new files in a folder inherit the folder group, and the sticky bit on a folder lets only a file owner delete it. They add a fourth leading digit: 4, 2 and 1.
Why does a folder need the execute permission?
For a folder, execute means permission to enter it and reach what is inside. Without it, you cannot open files in the folder even if you can read them.
What is a umask?
A mask of permissions to remove from new files. New files start from 666 and new folders from 777, then the umask bits are cleared. A umask of 022 gives 644 files and 755 folders.
What is the difference between 644 and 755?
Both let the owner write and everyone read. 755 also lets everyone execute, which is needed for programs and for folders.