1. Home
  2. Developer tools
  3. Chmod Calculator

Chmod Calculator

Work out the right permission number before you run chmod on a server, or decode the -rwxr-xr-x you see in ls -l.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use Chmod Calculator

  1. Tick the boxes, type an octal mode or paste a symbolic string.
  2. Check the warnings for risky combinations.
  3. Copy the chmod command.

Features

  • Octal ⇄ symbolic in both directions
  • setuid, setgid and sticky bit (the fourth digit)
  • Symbolic chmod command (u=rwx,g=rx,o=rx) as well as the numeric one
  • Warnings for world-writable files and setuid binaries
  • umask: default modes for new files and folders

Supported formats

Input

  • Form input

You get

  • Copied text

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the Chmod Calculator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Access control lists (setfacl) and SELinux labels are separate from these mode bits.

Guide

Understanding Linux file permissions and chmod numbers

Every file and folder on Linux and macOS carries a small set of permission bits that decide who may read it, change it or run it. They appear as strings like -rwxr-xr-x in ls -l and as numbers like 755 in chmod commands, and translating between the two in your head is where mistakes happen. This calculator lets you tick boxes, type a number or paste a string, and shows every form at once with the command to run.

Three classes, three bits

Permissions are set separately for the file’s owner, its group and everyone else. Each class has three bits: read, write and execute. In octal notation each bit has a value, read 4, write 2 and execute 1, and one digit per class is simply their sum. Read and write make 6, read and execute make 5, all three make 7. So 750 means the owner may do everything, the group may read and run, and others get nothing.

Execute on folders

On a directory the bits mean something slightly different. Read lets you list the names inside, write lets you create, rename and delete entries, and execute lets you enter the folder and reach the files in it. A folder with read but no execute shows file names but refuses to open any of them, which is why folders normally need 755 or 750 while ordinary files use 644 or 640.

The special bits

A fourth, leading digit holds three special bits. Setuid (4000) makes a program run with its owner’s rights, as passwd does. Setgid (2000) on a program runs it with the file’s group; on a folder it makes new files inherit the folder’s group, which is useful for shared project directories. The sticky bit (1000) on a folder such as /tmp lets everyone create files but only delete their own. In ls -l they appear as s or t in place of an execute bit.

Symbolic notation

chmod also accepts symbolic modes, which state the result per class: u=rwx,g=rx,o= gives the same result as 750. The calculator shows both forms. Symbolic modes are handy in scripts because they say what they mean, and forms such as g+w change one bit without touching the others.

A worked example

Type 750 and the tool shows -rwxr-x--- as the ls -l string, chmod 750 deploy.sh as the command and chmod u=rwx,g=rx,o= deploy.sh as the symbolic equivalent. Clicking the 1777 preset for shared temporary folders gives -rwxrwxrwt, where the final t marks the sticky bit, and a warning that the mode is world-writable.

umask and new files

When a program creates a file, the system starts from 666 for files and 777 for folders and removes the bits set in the process’s umask. With the common umask 022, new files are 644 and new folders 755; with 027 they are 640 and 750, which hides them from other users. The umask box shows both results.

Warnings worth reading

The calculator flags modes that let others write to a file, because anyone on the system could then change a script that someone else runs. It also flags setuid on an executable, since a setuid program with a bug becomes a privilege-escalation route, and warns about 777 in particular. Changing ownership with chown is usually the right fix when a service cannot write somewhere, rather than opening the permissions to everyone.

Checked against the current version of the Chmod Calculator on .

Frequently asked questions

What permissions does an SSH private key need?

Owner read and write only: chmod 600 ~/.ssh/id_ed25519, and 700 for the ~/.ssh folder itself. OpenSSH refuses to use a private key that group or others can read and prints “permissions are too open”.

What does the capital S or T in ls -l mean?

A capital letter means the special bit is set but the execute bit under it is not. -rwSr--r-- has setuid without owner execute, which usually means a mistake, because setuid only has an effect on an executable file.

Why do folders usually need 755 but files 644?

On a directory, the execute bit means “may enter and access files inside”. Without it, users cannot open anything in the folder even if they can list it. Plain files only need execute when they are programs or scripts.

Is chmod 777 ever a good idea?

Rarely. It lets every user on the system change or replace the file. A web server that “needs” 777 usually needs the right owner instead: chown the folder to the server’s user and use 755 or 775.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.