Chmod Calculator

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free chmod calculator. Tick read, write and execute for owner, group and others to get the numeric (755) and symbolic (rwxr-xr-x) permissions and the command.

Owner
Group
Others
Special
Numeric
0
Symbolic
0
Command

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the chmod calculator

There are two ways in:

  • Tick the boxes. For the owner, the group and everyone else (others), tick Read, Write and Execute as needed. The special bits (setuid, setgid and sticky) are in the fourth box.
  • Or type the permissions in the box at the top, as numbers such as 755 or 0644, or as letters such as rwxr-xr-x.

Either way, the chmod calculator keeps everything in step and shows:

  • The numeric (octal) permissions, such as 755.
  • The symbolic permissions, such as rwxr-xr-x, the way ls -l shows them.
  • What each group of people can do, in plain English.
  • The command to run, chmod 755 filename, ready to copy.
  • Warnings for risky settings, such as files anyone can change.

It runs in your browser, with no sign-up.

How Linux permissions work

Every file and folder on Linux, macOS and other Unix-like systems has three sets of permissions:

  • Owner (user): the account that owns the file.
  • Group: the members of the file's group.
  • Others: everyone else on the system.

Each set has three permissions:

Permission Letter Number On a file On a folder
Read r 4 View the contents List the files inside
Write w 2 Change the contents Add, delete and rename files inside
Execute x 1 Run it as a program or script Open it and reach the files inside

The number for each set is the sum of its permissions: read + write + execute = 4 + 2 + 1 = 7; read + execute = 4 + 1 = 5; read only = 4; nothing = 0. Three digits, one per set, give the full permissions: 755 means owner 7 (rwx), group 5 (r-x), others 5 (r-x).

Common chmod values

Numeric Symbolic Typical use
644 rw-r--r-- Normal files: web pages, images, documents. The owner can edit; everyone can read.
600 rw------- Private files: SSH private keys, files with passwords. Only the owner can read or write.
640 rw-r----- Config files the owner edits and a group (such as the web server) reads.
755 rwxr-xr-x Folders, and scripts or programs everyone may run. The owner can change them.
700 rwx------ Private folders and scripts: only the owner has any access.
750 rwxr-x--- Folders and programs shared with one group, hidden from others.
775 rwxrwxr-x Shared project folders where the whole group edits.
444 r--r--r-- Read-only for everyone, including the owner (who can still change permissions).
777 rwxrwxrwx Anyone can read, change and run. Almost never the right answer.

For websites, the usual advice is 644 for files and 755 for folders. Files containing secrets, such as database passwords, should be stricter, such as 640 or 600, depending on which account the web server runs as.

Why 777 is dangerous

Setting a file or folder to 777 lets every account on the system change it. On a shared server, that means any other user or any compromised program could replace your web page, inject code into your scripts, or delete your files. It's a common "fix" suggested online when something won't upload or save, but it usually hides the real problem, which is the wrong owner or group. The chmod calculator warns whenever "others" have write permission.

The better fix is to make the right account the owner (chown) or give the right group access (chgrp and 775 or 664), rather than opening the file to everyone.

Special permissions: setuid, setgid and sticky

A fourth digit at the front sets three special bits:

Bit Number Effect
setuid 4 A program runs with the rights of its owner rather than the person running it. passwd uses this to update the password file.
setgid 2 A program runs with the rights of its group. On a folder, new files inside get the folder's group, which is useful for shared folders.
sticky 1 On a shared folder, people can delete or rename only their own files. /tmp uses this.

In symbolic form, they replace the x in the right place: s for setuid in the owner's set, s for setgid in the group's set, and t for sticky in the others' set. A capital S or T means the special bit is set but execute isn't. So 4755 is rwsr-xr-x, 2775 is rwxrwsr-x and 1777 is rwxrwxrwt.

Setuid programs are a common target for attackers, so only use them when you understand exactly why they're needed.

Symbolic chmod commands

Besides numbers, chmod accepts symbolic changes, which add or remove permissions without touching the rest:

  • chmod u+x script.sh adds execute for the owner.
  • chmod go-w file.txt removes write from the group and others.
  • chmod a+r file.txt adds read for all (owner, group and others).
  • chmod -R 755 folder applies 755 to a folder and everything inside it. Be careful: that makes every file executable too. For websites, a safer approach is find folder -type d -exec chmod 755 {} + for folders and find folder -type f -exec chmod 644 {} + for files.

The chmod calculator works with the full numeric form, which sets every permission at once and is easiest to check.

Reading permissions from ls -l

Running ls -l shows a line like:

-rwxr-xr-x 1 anna staff 1204 Nov 14 09:30 backup.sh

The first character is the type: - for a file, d for a folder, l for a link. The next nine are the permissions. You can paste those nine characters, or all ten, into the chmod calculator to get the number. Here, rwxr-xr-x is 755.

Permissions for SSH keys

SSH refuses to use a private key that other people can read. If you see "Permissions are too open", set:

  • chmod 700 ~/.ssh for the folder.
  • chmod 600 ~/.ssh/id_ed25519 (or your key's name) for the private key.
  • chmod 644 ~/.ssh/id_ed25519.pub for the public key.
  • chmod 600 ~/.ssh/authorized_keys on the server.

chmod on a Mac

macOS uses the same permission system, and the same chmod command works in Terminal. The Finder's "Get Info" window shows simplified permissions (Read & Write, Read only, No Access), which map to the numbers in the chmod calculator: Read & Write is 6, Read only is 4, and No Access is 0. Execute permission isn't shown in Finder, but scripts still need it to run from Terminal.

Default permissions and umask

New files don't start with random permissions. The system starts from 666 for files and 777 for folders, then removes the bits in your "umask". With the common umask of 022, new files become 644 and new folders 755. With a stricter umask of 077, they become 600 and 700, private to you. Run umask in a terminal to see yours.

A worked example

A bakery's developer uploads a new version of the shop's website to a Linux server. The pages load, but the nightly backup script fails with "Permission denied", and the config file with the database password is readable by every account on the server.

He runs ls -l and sees the script is rw-r--r-- and the config file is rw-rw-rw-. He pastes rw-r--r-- into the chmod calculator: 644. Read and write for the owner, read for everyone else, and nobody can run it. He ticks Execute for the owner and the group: the calculator shows 754 and rwxr-xr--, "Others can read it". Since others don't need to read the script at all, he unticks their Read: 750, rwxr-x---. He runs chmod 750 backup.sh.

For the config file, the calculator shows rw-rw-rw- as 666 with a red warning: everyone can change it. The web server runs in the file's group, so he sets 640 (rw-r-----): the owner can edit, the web server can read, and other accounts see nothing. The backup runs that night, and the password is no longer exposed.

Need more customers from Google?

This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.

More tools for technical work: the subnet calculator for IP networks, the hash generator for checking files, and the UUID generator for unique IDs.

Frequently asked questions

What does chmod 755 mean?

The owner can read, write and execute (7); the group and others can read and execute (5 each). In letters, rwxr-xr-x. It's the usual setting for folders and shared scripts.

What does chmod 644 mean?

The owner can read and write (6); the group and others can only read (4 each). In letters, rw-r--r--. It's the usual setting for normal files, such as web pages.

How do I convert rwxr-xr-x to numbers?

Add up each set of three: rwx = 4 + 2 + 1 = 7, r-x = 4 + 1 = 5, r-x = 5. So rwxr-xr-x is 755. The chmod calculator converts it for you.

Is chmod 777 safe?

Rarely. It lets every account on the system change the file. Fix ownership with chown or use group permissions instead.

What is the fourth digit in chmod, as in 4755?

It sets the special bits: 4 for setuid, 2 for setgid and 1 for sticky, added together. 4755 is 755 with setuid.

Is this chmod calculator free?

Yes. It's free, needs no sign-up, and runs in your browser.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep