IT Tool

CHMOD Calculator - Octal and Symbolic Linux Permissions

Build any Linux file mode from checkboxes, including setuid, setgid, and the sticky bit, and read the octal and symbolic form side by side. Paste an octal value to load it back.

Instant 100% Client-Side No Login
PROCESSINGLOCAL
LIMITNONE
PRIVACYBROWSER-ONLY

Permission settings

Owner (user)

Group

Public (others)

Special bits

Results

Octal
644
Symbolic
-rw-r--r--

Terminal commands

chmod 644 filename
chmod -R 644 directoryname/

The recursive form applies the same mode to every file and folder inside. Applying a file mode like 644 recursively strips the execute bit that directories need to be entered, so use it with care.

How a Unix file mode is actually built

Every file and directory on a Linux, macOS, or BSD system carries a mode: a small set of bits that decide who may read it, change it, and run or enter it. The bits are grouped into three classes. The owner is the single user account that owns the file. The group is one group the file belongs to, and any user who is a member of that group is judged by the group bits. Everyone else falls into the third class, usually called others or public. The system checks these in order, so if you are the owner you are judged by the owner bits alone, even if the group or others would be granted more.

Within each class there are three permissions, each with a numeric value that comes from its position in binary: read is 4, write is 2, and execute is 1. Because those three values never overlap, adding them can only produce one combination, which is why a single digit from 0 to 7 describes a whole class exactly. Read plus write is 6, read plus execute is 5, and all three is 7. Line up the owner digit, the group digit, and the others digit and you have the familiar three-digit octal number, 644 or 755, that people quote for permissions.

The symbolic string is the same information written out. A directory listing shows it as ten characters: the first marks the type, a dash for a regular file or a d for a directory, and the remaining nine are the three classes in order, each shown as r, w, and x or a dash where the permission is absent. So 644 on a file reads as -rw-r--r-- and 755 on a directory reads as drwxr-xr-x. This calculator shows both forms together so the number and the letters always agree.

Why execute means “enter” on a directory

The execute bit is the one that trips people up, because it does two unrelated jobs. On a regular file it means the file may be run as a program or script. On a directory it has nothing to do with running anything; it is the permission to traverse the directory, to cd into it and to reach the files it holds. A directory can even be readable without being executable, and the result is odd: you can list the names inside but cannot open any of them. This is exactly why directories are 755 and files are 644, and why copying a file mode onto directories locks them.

The fourth digit: setuid, setgid, sticky

A mode can carry a leading fourth digit for three special bits. setuid, value 4, makes a program run as its owner instead of the person launching it, which is how an ordinary user can change their password in a root-owned file. setgid, value 2, does the same for the group, and on a directory it makes new files inherit that group so shared folders stay consistent. The sticky bit, value 1, on a directory restricts deletion to each file’s owner, which is what keeps /tmpwritable by all yet safe from cross-deletion. Tick these and the octal grows a digit, as in 4755 or 1777.

The subtle part: capital S and capital T

The special bits do not get their own column in the symbolic string. Instead they take over the execute position of the class they affect, which is why the same slot can show four different letters. When setuid is set and the owner also has execute, the owner’s execute slot shows a lowercase s. When setuid is set but execute is off, it shows an uppercase S. The same pattern holds for setgid in the group column, and for the sticky bit in the others column, where the letters are t and T instead.

The uppercase form is a genuine warning sign, not a display quirk. A setuid or setgid bit on a file that nobody can execute accomplishes nothing, because the bit only takes effect when the file is run. Seeing an uppercase S usually means someone set a special bit and forgot the execute bit, or stripped execute later and left the special bit stranded. Many calculators quietly render a lowercase letter regardless, hiding the mistake. This one renders exactly what your choices produce, so if you get a capital S or T you can decide whether that is what you meant.

Common modes you will actually reach for

  • 644 — the default for regular files: the owner can read and write, everyone else can only read. Right for documents, images, and web pages.
  • 755 — the default for directories and for scripts and programs: full control for the owner, read and enter or read and run for everyone else.
  • 600 — private files: only the owner can read or write, and no one else can even read. The correct mode for SSH private keys, which tools refuse to use if they are more open.
  • 700 — a private directory only the owner can enter, such as a personal .ssh folder.
  • 2775 — a shared group directory with setgid, so files created inside inherit the group and collaborators keep access.
  • 1777 — a world-writable directory with the sticky bit, the exact mode of /tmp, where anyone can add files but only owners can remove their own.

Using the result safely

This tool computes the mode; it never changes a file. When you run the command it builds, two habits save trouble. First, be deliberate with the recursive -R flag: it applies one mode to files and directories alike, so a value that is correct for files will strip the execute bit directories need, and a value correct for directories will mark every file executable. When both need setting, target them separately with find . -type f and find . -type d, or use GNU chmod’s capital X, which adds execute only to directories and to files that already have it.

Second, remember that permissions are only half of access; ownership is the other half. If a file is owned by the wrong user or group, no chmod value will make the right person able to use it, and the fix is chownrather than a more permissive mode. Reaching for 777 to “make it work” almost always means the real problem is ownership or a missing directory execute bit, and the open mode just papers over it while creating a security hole.

If you are lining up several changes, the load box turns this into a two-way reference: paste a mode you found in a config file or a tutorial, read back exactly which bits it sets, and adjust from there. For related command-line work you can format and inspect other snippets with the JSON Formatter or decode tokens with the Base64 Converter.

How to Use

1

Pick File or Directory so the symbolic string starts with the right type character and the notes match what you are setting.

2

Tick Read, Write, and Execute for owner, group, and public; the octal and symbolic forms update as you go.

3

Tick setuid, setgid, or sticky if you need them; watch the execute column change to s, S, t, or T.

4

Copy the ready-made chmod command, or the octal or symbolic value on its own.

5

Already have a value like 755 or 4755? Type it into the load box and the checkboxes fill in to match.

Features

Full four-digit modes, including the setuid, setgid, and sticky special bits most calculators leave out
Symbolic string that renders s, S, t, and T correctly, so a special bit with execute off is not hidden
File and directory modes, with the leading type character and guidance that matches each
Reverse lookup: paste an octal value and the checkboxes load to match it
Copy the octal, the symbolic string, or a complete chmod command in one click
Runs entirely in your browser; no path, permission, or command ever leaves the page

Common Questions

Use this chmod calculator to translate between octal permission values like 644, 755, and 4755 and their symbolic form such as -rw-r--r-- or drwxr-sr-x, with full support for the setuid, setgid, and sticky special bits. Build a mode from checkboxes or paste an octal value to load it back, then copy the exact chmod command for a file or a directory. Everything runs in your browser.

About CHMOD Calculator

Turn read, write, and execute choices for owner, group, and public into the octal value and the symbolic string at once, with full support for the setuid, setgid, and sticky special bits that most calculators leave out. The symbolic form renders s, S, t, and T correctly, so a special bit set without execute is shown rather than hidden. Switch between file and directory modes, paste an octal value like 755 or 4755 to load it back into the boxes, and copy the octal, the symbolic string, or a complete chmod command. Everything runs in your browser.

Also known as: chmod, chmod calculator, file permission calculator, linux permissions, unix permissions, octal permission, symbolic permission, setuid calculator, setgid bit, sticky bit, chmod 755, chmod 644, chmod 777, permission converter.

Processing Note

CHMOD Calculator runs in your browser, so the input you enter is processed locally on this page and is not uploaded to a ToolMintX account.

Tool Limits

IT tools provide quick diagnostics and transformations. They cannot see every private network, deployment setting, proxy, firewall, or production edge case.

Explore More