By · Updated

CHMOD Calculator

Octal File Permissions Explained, From 755 to rwxr-xr-x and Back

No ratings yet
ReadWriteExecute
Owner
Group
Public
Octal
Long string
4-digit octal
Symbolic
Command

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the CHMOD Calculator works

This chmod calculator shows numeric and symbolic permissions together. Tick the boxes for owner, group and public and every form of the permission appears at once — the octal number, the rwxr-xr-x string ls -l prints, the four-digit form with the special bits, the normalised symbolic form, and the command to paste into a terminal. Typing a permission you already have works in the other direction too.

Every file and directory on Linux, macOS and other Unix systems carries a permission mode that decides who can read it, change it and run it. Get it wrong one way and a deploy fails with "permission denied"; get it wrong the other way and a private key or a config file full of passwords is readable by every account on the server. This calculator shows every way of writing the same mode, so you can check what a number means before you type it.

How the chmod calculator adds up

A mode has nine basic bits in three groups: the file's owner, the file's group, and public (everyone else, which chmod calls "other"). Each group has read, write and execute, worth 4, 2 and 1. Add them and each group becomes one octal digit, from 0 to 7:

Write the three digits side by side and you have the number chmod expects. So 644 means owner read and write, group read, public read, and 755 adds execute for all three.

The rwxr-xr-x string that ls -l prints is the same nine bits spelled out. Read it in threes: rwx r-x r-x is owner, group, public, and a dash means the bit is off. A tenth character at the front is the file type, not a permission: d for a directory, - for a regular file and l for a symlink. You can paste either form into the input box, dash-prefixed or not.

Files and directories read the bits differently

On a file, execute means it can be run as a program or script. On a directory, execute means you can traverse it, entering it and reaching the files inside by name. Read on a directory only lets you list the names. A directory with read but no execute shows its contents and then refuses to open any of them, which is the classic "I can see it but I get permission denied". That is why directories are almost always 755 or 750, while the files inside are 644 or 640.

Where the common modes are used

Mode Typical use
644 Web pages, images, most config files
755 Directories, scripts and binaries everyone may run
600 SSH private keys, .env files, credentials
700 ~/.ssh directory, private script folders
640 Config readable by a service's group but not the public
444 Files that should never change, even by the owner by accident
1777 Shared temp directories such as /tmp

OpenSSH enforces some of this: it refuses to use a private key that group or public can read, with the warning "UNPROTECTED PRIVATE KEY FILE". chmod 600 ~/.ssh/id_ed25519 is the fix.

The special bits

A fourth leading digit carries three more bits.

In the long string these bits replace the execute letter: s when execute is also on, capital S when it is off, and t or T in the public column. A capital letter usually signals a mistake, since setuid without execute does nothing useful.

Reading the result

Symbolic input is relative. Typing go-w or u+x changes the boxes that are currently ticked, exactly as chmod changes a file's current mode. For example, start from 644, apply u+x and you get 744. The = form is absolute for the groups it names, so u=rwx,go=rx is always 755. Capital X adds execute only if some execute bit is already set, which is how chmod -R a+X makes directories traversable without making every file executable.

Tips and pitfalls

Octal is just base 8, so the base converter will show a mode in binary if you want to see the bits laid out. For scheduling the scripts you have just made executable, try the cron expression tool.

FAQ

What does chmod 755 mean?

It grants read, write and execute to the owner, and read and execute to the group and everyone else. In long form it is rwxr-xr-x. It is the standard permission for directories and for scripts and programs that anyone on the system is meant to be able to run but only the owner may change.

What is the difference between 644 and 664?

The middle digit — the group. Both give the owner read and write and everyone else read-only. 664 adds write for the group as well, so any member of the file's group can edit it. Use 664 for files a team genuinely shares, and 644 when only the owner should ever change the contents.

What is the sticky bit, and when do I need it?

The sticky bit is set on a directory and means a file inside it can only be deleted or renamed by that file's owner, even though everyone can write to the directory. /tmp uses it, as 1777, so that any account can create temporary files there without being able to remove anyone else's.

Why did chmod 777 not fix my problem?

Because the failure was probably not the permission bits. 777 cannot help if a parent directory lacks execute, if the file is owned by another user and the process needs to change ownership, or if SELinux or AppArmor is denying access. It does guarantee that every account on the machine can now rewrite the file, so undo it.

What does the S or T mean instead of x?

A capital letter means the special bit is set but the matching execute bit is not — S for setuid or setgid without execute, T for a sticky directory that is not otherwise traversable by the public. It is almost always a mistake, and the lower-case s or t is what you actually wanted.

Does this calculator send anything to a server?

No. Every conversion runs in JavaScript in your own browser, with no network request at any point. Nothing you type into the symbolic field and nothing you tick in the matrix leaves the page, so file names and permissions you are debugging stay entirely local.

See also: all Dev Utilities tools, Formatters & Validators, Data & Encoding, Security & Identifiers, SEO, Accessibility, AI.

Related tools