Chmod Calculator
Convert Linux file permissions between numbers and letters, and see who can do what.
Runs entirely in your browser. Nothing you paste is sent to our server, stored or logged.
| Who | Read | Write | Execute |
|---|---|---|---|
| Owner | |||
| Group | |||
| Everyone else |
ls -l, file type letter and all.
Common permissions
Who can do what
Command
With a number
With letters
Tick the permissions you want, type a number such as 755, or paste the permission string from ls. Everything stays in sync, and you get the exact chmod command to run along with a plain explanation of who can read, change or run the file.
How chmod numbers work
Linux permissions come in three sets: the owner, the group and everyone else. Each set can read, write and execute. Read is worth 4, write is worth 2 and execute is worth 1, and each digit in a chmod number is the total for one set. So 7 means everything, 6 means read and write, 5 means read and execute and 4 means read only.
Reading permission strings
The same permissions appear as letters when you run ls -l. The first character is the file type, d for a directory and - for a regular file, followed by three groups of rwx. A missing permission shows as a dash in its position, so rwxr-xr-x is 755 and rw-r--r-- is 644.
Setuid, setgid and the sticky bit
An optional fourth digit at the front sets special modes. 4 is setuid, which runs a program with its owner's rights. 2 is setgid, which runs it with the group's rights, or makes new files in a directory inherit that group. 1 is the sticky bit, which stops users deleting each other's files in a shared folder such as /tmp. They appear as s and t in place of the execute letters.
How to use the chmod calculator
- Choose permissionsTick read, write and execute for the owner, the group and everyone else.
- Or type a valueEnter a number such as 644, or paste the permission string straight from ls.
- Copy the commandCopy the numeric or the symbolic chmod command and run it in your terminal.
Common chmod permissions, explained
What each one allows, where it belongs and when to avoid it.
-
chmod 755: owner can do everything; everyone else can read and execute
rwxr-xr-x -
chmod 644: owner can read and write; everyone else can only read
rw-r--r-- -
chmod 777: everyone can read, change and execute
rwxrwxrwx -
chmod 700: owner can do everything; nobody else has any access
rwx------ -
chmod 600: owner can read and write; nobody else has any access
rw------- -
chmod 775: owner and group can do everything; everyone else can read and execute
rwxrwxr-x -
chmod 664: owner and group can read and write; everyone else can only read
rw-rw-r-- -
chmod 400: owner can only read; nobody else has any access
r--------
Common questions
What does chmod 755 mean?
The owner can read, write and execute, and everyone else can read and execute. It is the usual setting for directories and for scripts other users need to run.
What is the difference between 755 and 644?
755 adds execute permission for everyone. Use 755 for directories and programs, and 644 for ordinary files such as web pages and images, which only need to be read.
Is chmod 777 safe?
Rarely. It lets every user and process on the machine change the file. Fix a permission error by giving the right user ownership with chown instead, and keep directories at 755 or 775.
What does execute mean on a directory?
On a directory, execute means permission to enter it and open the files inside by name. Without it, even a directory you can read cannot be opened.
How do I change permissions for a whole folder?
Use chmod with its recursive option, a capital R, on the folder. Be careful: that gives every file the same permission as the directories. Most people set directories to 755 and files to 644 separately, using find to select each kind.
Does this calculator send my data anywhere?
No. Every calculation happens in your browser, and nothing you type is sent to our server.
Guides
-
How to fix the SSH "unprotected private key file" error
SSH refuses to use a private key that other people could read. Here is exactly which permissions it wants, and how to set them on Linux, macOS, Windows and WSL.
-
Linux file permissions explained: chmod numbers, chown and permission denied
What rwx really means, how numbers like 755 and 644 are built, when to reach for chown instead of chmod, and how to fix permission denied without resorting to 777.
More developer tools
Like this one, every developer tool here runs in your browser and never sends what you paste to a server.
JSON Formatter and Validator
Pretty print, minify and validate JSON, with the exact line of any error and how to fix it.
Cron Expression Generator
Write a cron schedule, read it in plain English and see when it runs next.
Unix Timestamp Converter
Turn Unix timestamps into readable dates and back, in seconds or milliseconds.