Chmod Calculator

Tick the permissions or type a number like 755 and get the symbolic form and the chmod command. Free Linux and Unix file permissions calculator.

ClassRead (4)Write (2)Execute (1)
Owner (user)
Group
Others (world)

Three digits 0–7, for example 644.

Nine characters, for example rw-r--r--.

Command
chmod 755 filename

Same result with symbolic notation: chmod u=rwx,g=rx,o=rx filename · ls -l shows -rwxr-xr-x

How to use the chmod calculator

  1. Tick read, write and execute for the owner, the group and others, or type a number (755) or letters (rwxr-xr-x). All views stay in sync.
  2. Optionally type the file or directory name and tick Recursive to include everything inside a directory.
  3. Copy the command and run it in your terminal.

Worked example

A deploy script should be runnable by you and readable by others. Tick owner read+write+execute (7), group read+execute (5) and others read+execute (5): that is 755, rwxr-xr-x, and the command is chmod 755 deploy.sh. For a private SSH key, owner read+write only gives 600.

Common chmod permissions

ModeSymbolicTypical use
rw-r--r--Regular files: owner reads and writes, everyone else reads. Default for web content and config files.
rwxr-xr-xDirectories and executables: owner full control, everyone else can read and run/enter.
rw-------Private files such as SSH private keys and .env files: only the owner can read and write.
rwx------Private directories and scripts, for example ~/.ssh: only the owner has any access.
rw-rw-r--Shared files where a group of users should also be able to edit.
rwxrwxr-xShared directories where a group needs write access.
r--------Read-only for the owner, for example a key or certificate you never want to overwrite by accident.
rwxrwxrwxAvoid. Everyone can read, write and execute. Almost never correct: any user or compromised process can modify it.

Select a mode to load it into the calculator. Digits are owner, group, then others; read = 4, write = 2, execute = 1.

Frequently Asked Questions (FAQ)

What does chmod 755 mean?

The owner can read, write and execute (7 = 4+2+1); the group and everyone else can read and execute (5 = 4+1) but not write. In symbolic form that is rwxr-xr-x. It is the usual mode for directories, scripts and programs.

How do the numbers in chmod work?

Each digit is the sum of the permissions for one class: read = 4, write = 2, execute = 1. The three digits are the owner (user), the group and others, in that order. So 6 = 4+2 = read and write, and 644 means owner rw-, group r--, others r--.

What is the difference between chmod 644 and 755?

644 has no execute bit, so it suits ordinary files such as HTML, images and config files. 755 adds execute for everyone, which is needed to run a script or program and to enter (cd into) a directory.

Why is chmod 777 dangerous?

777 lets every user on the system read, write and execute the file. On a web server this lets a compromised or malicious process modify your code or upload scripts. If a permissions error tempts you to use 777, fix the owner or group instead (chown, chgrp) and use 755 or 775.

What permissions should an SSH key have?

A private key such as ~/.ssh/id_ed25519 should be 600 (or 400), and the ~/.ssh directory 700. OpenSSH refuses to use a private key that other users can read, with the message "UNPROTECTED PRIVATE KEY FILE".

What does the execute bit mean on a directory?

For a directory, execute means permission to enter it and access items inside by name. Read lets you list the names. Without execute on a directory you cannot open the files in it, even if the files themselves are readable.

Does this cover setuid, setgid and the sticky bit?

This calculator covers the standard nine permission bits, which is what chmod is used for in most cases. Special bits add a leading fourth digit (for example 4755 for setuid, 1777 for a sticky /tmp-style directory); they are outside what this tool sets.