Chmod calculator

Tick the permissions you want, or type a number such as 755, to see the matching octal value, rwx string and ready-to-run chmod command.

Read (4)Write (2)Execute (1)
Owner
Group
Others
Command

Common permissions

How to use the chmod calculator

  1. Tick the boxes for what the owner, the group and everyone else may do. Or type a number such as 644, or a string such as rw-r--r--.
  2. Enter the file or folder name to complete the command.
  3. Click Copy and paste the command into your terminal.

How chmod numbers work

Each permission has a value: read is 4, write is 2 and execute is 1. Add the ones you want to get a digit from 0 to 7. A chmod number has one digit each for the owner, the group and everyone else.

DigitPermissionsSymbolic
7Read, write and executerwx
6Read and writerw-
5Read and executer-x
4Read onlyr--
0Nothing---

Common permission sets

NumberSymbolicTypical use
644rw-r--r--Normal files: web pages, images, config files
755rwxr-xr-xFolders, scripts and programs
600rw-------Private files such as SSH keys and .env files
700rwx------Private folders such as ~/.ssh
664rw-rw-r--Files a team edits together
775rwxrwxr-xShared team folders
400r--------Read-only secrets, such as a cloud key file

Files and folders are different

On a folder, read lets you list its contents, write lets you add and delete files in it, and execute lets you enter it. A folder without execute cannot be opened, which is why folders are usually 755 while the files inside are 644.

Why 777 is a bad idea

777 lets every user on the system change or replace the file. On a web server, that means any compromised script can rewrite your site. If something only works with 777, the real problem is almost always the wrong owner, and chown is the fix.

Special bits

  • Setuid (4000): a program runs as the file's owner, not as the person who started it.
  • Setgid (2000): on a folder, new files inherit the folder's group. Handy for shared team folders.
  • Sticky bit (1000): on a folder, people can delete only their own files. /tmp uses it.

Private by design

This tool runs entirely in your web browser. Nothing you type or paste is sent to a server, logged or stored, so it is safe to use with internal addresses, configuration files and other work data. There is no sign-up and it keeps working offline once the page has loaded.

Frequently asked questions

What does chmod 755 mean?

The owner can read, write and execute. The group and everyone else can read and execute but not change the file. It is the usual setting for folders and scripts.

What does chmod 644 mean?

The owner can read and write. Everyone else can only read. It is the usual setting for ordinary files.

What permissions should an SSH private key have?

600, so only you can read it. SSH refuses to use a key that other users can read.

How do I change permissions on a folder and everything in it?

Add -R, for example chmod -R 755 folder. Take care, because that also makes every file inside executable.

What is the difference between chmod and chown?

chmod changes what the owner, group and others are allowed to do. chown changes who the owner and group are.