chmod Calculator

Work out Unix file permissions: tick boxes or type 755 or rwxr-xr-x, get the chmod command, and try u+x style changes.

Runs in your browser. Nothing is uploaded.

Permissions
WhoReadWriteExecute
Owner
Group
Everyone else

Command
Same, in symbolic form

      Apply a change

      Type what you would pass to chmod, such as u+x, go-w or a=r,u+w.

      What does my umask give?

      How to use the chmod Calculator

      1. Tick the boxes for what the owner, the group and everyone else may do, or click a common value such as 644 or 755.
      2. Or type a number like 750 or symbols like rwxr-x---. You can also paste a line from ls -l, such as -rw-r--r--.
      3. Enter the file or folder name and copy the ready-made chmod command.
      4. Use Apply a change to try expressions like u+x or go-w, and the umask box to see what new files will get.

      Read and write Unix permissions

      On Linux, macOS and other Unix systems, every file and folder has three sets of permissions: one for its owner, one for its group and one for everyone else. Each set says whether that person may read, write and execute. You see them as nine letters in ls -l (rwxr-xr-x) and set them with chmod, usually as a three-digit number such as 755.

      From boxes to numbers and back

      Tick the boxes and the octal number, the symbolic form and the command update instantly. It works in reverse too: type 640, type rw-r-----, or paste a whole permission column from ls -l such as drwxr-x---. The plain-English summary spells out what each group can do, and a warning appears for risky settings like world-writable files or 777.

      The command, ready to run

      Enter a file or folder name and you get two equivalent commands: the numeric chmod 640 notes.txt and the symbolic chmod u=rw,g=r,o= notes.txt. Names with spaces are quoted for the shell.

      Relative changes

      chmod also accepts changes relative to what is already there: u+x adds execute for the owner, go-w removes write for group and others, and a=r sets everyone to read-only. Type one in Apply a change to see the result before you run it. The capital X works as it does in chmod: it adds execute only to folders and files that are already executable by someone, which is the safe way to fix permissions across a whole directory tree.

      Special bits and umask

      The optional first digit holds setuid, setgid and the sticky bit, shown as s and t in symbolic form. The umask box answers a common question: if your umask is 022, new files are created as 644 and new folders as 755; with 077 they are 600 and 700.

      Nothing leaves your browser

      All calculations run locally. For other command-line helpers, see the Git Cheat Sheet and the Cron Expression Generator.

      Frequently asked questions

      What do the numbers in chmod 755 mean?

      Each digit is one group of people: owner, group, then everyone else. Within a digit, read counts 4, write counts 2 and execute counts 1, and you add them up. So 7 is read, write and execute; 5 is read and execute; 4 is read only.

      What permissions should files and folders have?

      A common default is 644 for files (you can edit, others can read) and 755 for folders and scripts (others can open and run, but not change). Private files such as SSH keys should be 600 or 400, and their folder 700.

      What does execute mean for a folder?

      For a folder, execute means you can enter it and reach the files inside. Read lets you list the names. A folder with read but no execute shows names you can’t open.

      What are setuid, setgid and the sticky bit?

      They form the optional fourth digit at the front. Setuid (4) runs a program as its owner, setgid (2) runs it as its group or makes new files in a folder inherit the folder’s group, and sticky (1) on a folder such as /tmp stops users deleting each other’s files.

      Why is 777 a bad idea?

      It lets every user and every service on the machine change or replace the file. If a website process is compromised, an attacker can use it to modify your code. Fix the owner or group instead.

      Does this tool change anything on my computer?

      No. It only calculates and builds the command; you run it yourself. Nothing is sent anywhere.

      Tutorials