Chmod Calculator

Set Linux and macOS file permissions by ticking boxes, or type an octal number like 755 or a symbolic string like rwxr-xr-x to see exactly what it allows. The matching chmod command updates as you go.

chmod-calculator · runs locally
ReadWriteExecute
Owner
Group
Others
Owner: read, write, execute · Group: read, execute · Others: read, execute

How to use the chmod calculator

Tick the permissions each class of user should have. The octal number, the symbolic string and the full chmod command update together, and the line underneath spells out who can do what. You can also work backwards: type 640 into the octal box, or paste the first column of an ls -l listing such as -rw-r----- into the symbolic box, and the checkboxes follow. Preset buttons cover the modes people look up most often.

Common chmod values

OctalSymbolicTypical use
755rwxr-xr-xDirectories, scripts, binaries
644rw-r--r--Web pages, images, most files
700rwx------Private directories such as ~/.ssh
600rw-------SSH private keys, .env files, credentials
664 / 775rw-rw-r-- / rwxrwxr-xFiles and folders shared with a group
640rw-r-----Config readable by a service's group, hidden from others
1777rwxrwxrwtShared temp directories (sticky bit)

SSH is strict about this: if a private key is readable by anyone but you, the client refuses to use it with an “unprotected private key file” warning. chmod 600 ~/.ssh/id_ed25519 fixes it. The guide to Linux file permissions explains the model in depth, including symbolic commands like chmod u+x and recursive changes. If a cron job fails because its script is not executable, the Cron Expression Parser helps check the schedule once the permissions are fixed.

Frequently asked questions

What does chmod 755 mean?

Each digit is the sum of read (4), write (2) and execute (1) for one class of user. 755 gives the owner 7 (read, write, execute) and the group and everyone else 5 (read, execute). In symbolic form it is rwxr-xr-x. It is the usual mode for scripts, programs and directories that other users need to open but not change.

What is the difference between chmod 644 and 755?

Only the execute bit. 644 (rw-r--r--) lets the owner edit and everyone read, which suits documents, images, HTML and config files. 755 adds execute for all three classes, which a file needs to run as a program and a directory needs before anyone can enter it or reach the files inside.

Is chmod 777 ever a good idea?

Rarely. 777 lets every account on the machine, including a compromised web server process, rewrite or replace the file. When something only works at 777, the real fix is usually to change the file's owner or group with chown so the right user gets access, then use 755 or 775 for directories and 644 or 664 for files.

What are setuid, setgid and the sticky bit?

They are the optional fourth (leading) digit. Setuid (4) makes an executable run as its owner, which is how passwd can update a root-owned file. Setgid (2) on a directory makes new files inherit the directory's group, handy for shared project folders. The sticky bit (1) on a directory, as on /tmp with mode 1777, lets users delete only their own files. A capital S or T in the symbolic string means the special bit is set without the underlying execute bit.

Why do directories need the execute bit?

On a directory, read lets you list the names inside, but execute is what lets you enter it and open the files within. A directory set to 644 shows names in a listing but refuses access to every file in it, which is why folders are normally 755 or 700.