Back to Home

chmod Calculator

Calculate Linux file permissions visually

chmod 755 file.txt

Permission Matrix

ReadWriteExecuteValue
Owner7
Group5
Others5

Common Presets

About This Tool

Convert Linux and Unix file permissions between checkboxes, octal numbers like 755, and symbolic notation like rwxr-xr-x, with presets for common settings.

A visual helper for Unix file permissions

On Linux, macOS, and other Unix-like systems, every file and directory carries permission bits that decide who may read, change, or run it. The chmod command sets those bits, usually with a three-digit octal number. Remembering that 640 means "owner can read and write, group can read, everyone else gets nothing" takes practice, so this calculator lets you tick boxes and see the numeric and symbolic forms update instantly. It works in both directions: type a number or a symbolic string and the checkboxes follow.

How to use the calculator

  1. In the Permission Matrix, tick Read, Write, and Execute for Owner, Group, and Others. The value column shows each row's digit.
  2. Or type a three-digit octal value (each digit 0-7) into the Numeric field.
  3. Or type a nine-character symbolic string such as rw-r--r-- into the Symbolic field. A leading - or d copied from ls -l output is accepted and ignored.
  4. Click any of the Common Presets (644, 755, 777, 600, 400, 700, 666, 444) to load it.
  5. Copy the numeric or symbolic value, or use the ready-made chmod command shown under the result.

How the permission bits work

Permissions are grouped into three classes: the file's owner (user), the file's group, and others (everyone else). Each class has three bits:

LetterPermissionValueOn a fileOn a directory
rRead4View contentsList names of entries
wWrite2Modify contentsCreate, delete, rename entries
xExecute1Run as a program or scriptEnter it and access entries by name

Add the values to get one digit per class. Read plus write is 4 + 2 = 6; all three is 7; read plus execute is 5. Three digits, one per class, give the familiar octal mode. So 755 is rwxr-xr-x (owner has full control, everyone else can read and run), and 644 is rw-r--r-- (owner can edit, everyone else can only read).

Typical settings

  • 644 for ordinary files such as HTML, images, and documents on a web server.
  • 755 for directories and for scripts or binaries that others need to run.
  • 600 for private files such as SSH private keys or files holding credentials. SSH refuses to use a private key that others can read.
  • 700 for private directories, for example ~/.ssh.
  • 400 or 444 for files that should be read-only.

Common mistakes

  • Reaching for 777. It lets any user on the system modify or replace the file. If something "only works with 777", the real fix is usually correct ownership (chown) or group membership.
  • Forgetting execute on directories. A directory with read but no execute permission lets you see file names but not open the files inside.
  • Applying file modes recursively to directories. Running chmod -R 644 on a folder removes the execute bit from subdirectories and makes them inaccessible. Set directories and files separately, for example with find.
  • Expecting special bits. This calculator covers the standard nine bits. Setuid, setgid, and the sticky bit use a fourth leading digit (as in 1777 for /tmp) and are not handled here.

If octal itself is unfamiliar, the number base converter shows how each digit maps to three binary bits. Scheduling a maintenance script after setting its permissions? The cron expression generator helps with the timing.

FAQ

What is the difference between numeric and symbolic chmod?

Numeric mode (chmod 755 file) sets all bits at once. Symbolic mode on the command line (chmod u+x file) adds or removes specific bits and leaves the rest alone. The symbolic string shown here is the full nine-character view you see in ls -l.

Does chmod work on Windows?

Not natively. Windows uses access control lists instead, although tools like WSL and Git track Unix-style modes.

Why can root still read a 600 file?

The superuser bypasses normal permission checks. Permission bits protect users from each other, not from an administrator.