chmod Calculator
Tick read, write and execute to get the chmod number, or paste 755 or rwxr-xr-x to see what it allows. Test commands like chmod g+w,o-rwx before you run them.
Runs in your browser. Nothing is uploaded.
Updated
| Who | Read (4) | Write (2) | Execute (1) | Digit |
|---|---|---|---|---|
| Owner | 7 | |||
| Group | 5 | |||
| Others | 5 |
755-rwxr-xr-x
- Owner
- can read, change and run it
- Group
- can read and run it
- Others
- can read and run it
chmod 755 filechmod u=rwx,g=rx,o=rx filestat -c '%a %A' filestat -f '%Lp %Sp' fileTry a chmod command
See what chmod does to a file: give the permissions it has now and the argument you want to run.
- now 755 rwxr-xr-x
g+w→ 775 rwxrwxr-xo-rwx→ 770 rwxrwx---
Result chmod g+w,o-rwx file gives 770 rwxrwx---
With umask 022, new files get 644 (rw-r--r--) and new folders 755 (rwxr-xr-x). Check yours with umask.
How to use chmod Calculator
- Tick permissions, type a number, or paste letters from ls -l.
- Read what each group of people can do, and any warnings.
- Copy the chmod command, or test one on existing permissions.
chmod Calculator at a glance
Typical use: Find out why chmod +x only made a script executable for you, not for the web server.
Runs in your browser; nothing is sent to our server. Follows GNU chmod (Linux), with notes where macOS differs.
When to use chmod Calculator
Tick who may read, write and execute, and get the number for chmod, or paste a number or the letters from ls -l to see what they allow. The page explains each part in plain English, for files and for folders, and points out risky settings such as files anyone can change.
“Try a chmod command” shows what an argument like g+w,o-rwx does to existing permissions, step by step, following GNU chmod (Linux) exactly, including the umask and its special cases for folders.
How the number works
Each digit is one group of people: the owner, the file’s group, then everyone else. Add 4 for read, 2 for write and 1 for execute: 7 = 4+2+1 (everything), 6 = read and write, 5 = read and execute, 4 = read only, 0 = nothing. So 754 means the owner has everything, the group can read and execute, and others can only read.
An optional fourth digit at the front adds special bits: 4 setuid, 2 setgid, 1 sticky. 2775 is a shared folder where new files keep the folder’s group; 1777 is a folder like /tmp where everyone can create files but only delete their own.
Common permissions
| Number | Letters | Use it for |
|---|---|---|
| 644 | rw-r--r-- | Ordinary files, web pages, images |
| 755 | rwxr-xr-x | Folders, scripts and programs |
| 600 | rw------- | Private files: SSH private keys, .env, ~/.ssh/authorized_keys |
| 700 | rwx------ | Private folders such as ~/.ssh |
| 640 | rw-r----- | Config files the service’s group must read |
| 775 / 664 | rwxrwxr-x / rw-rw-r-- | Folders and files a team edits together |
A folder and its contents
chmod -R 755 site/ also makes every file executable, which is rarely what you want. Set folders and files separately:
find site/ -type d -exec chmod 755 {} +
find site/ -type f -exec chmod 644 {} +Or use a capital X, which adds execute only to folders and to files that already have it: chmod -R u=rwX,go=rX site/.
Prefer the terminal?
On Linux or macOS, set permissions with a number or with letters:
chmod 644 notes.txt
chmod u+x deploy.shls -l shows the current permissions. Add -R to change a folder and everything in it, but see “A folder and its contents” below first.
References
Frequently asked questions
What does chmod 777 do, and should I use it?
It lets everyone on the server read, change and run the file, or add and delete files in the folder. It usually hides a different problem, such as the wrong owner. Fix the owner with chown and use 755 for folders and 644 for files instead.
Why does SSH say my private key’s permissions are too open?
SSH refuses a private key that other users can read. Run chmod 600 ~/.ssh/id_ed25519 (or 400), and chmod 700 ~/.ssh for the folder.
What do the capital S and T in ls -l mean?
A special bit is set but execute isn’t: S is setuid or setgid without execute, T is sticky without execute for others. A lower-case s or t means both are set.
Why did chmod +x not add execute for everyone?
Without u, g, o or a, chmod leaves the bits in your umask alone. With a umask of 077, chmod +x only adds it for the owner. Write a+x to add it for everyone.
Why did chmod 755 not remove the setgid bit from my folder?
GNU chmod (Linux) keeps a folder’s setuid and setgid bits when the number has fewer than five digits. Use chmod 00755, or chmod g-s. macOS applies the number exactly.
Is what I enter sent to your server?
No. The page works it all out in your browser. The current number is kept in the address after #, which browsers don’t send to the server, so you can bookmark or share it.