ToolDash
Chmod Calculator

Chmod Calculator

Tick read, write and execute for owner, group and others, or type a mode like 644 or rwxr-xr-x. The octal value, symbolic string and ready-to-run chmod command all stay in sync.

  • Free, no sign-up
  • Runs in your browser — nothing is uploaded
  • Instant results, no waiting on a server

Tick the permissions you want, or type an octal mode like 644 or a string like rwxr-xr-x. Every view stays in sync, and the chmod command is ready to copy.

Permissions
Read (4)Write (2)Execute (1)Value
Owner (u)7
Group (g)5
Others (o)5

Special bits

e.g. 644, 0755, 4755

e.g. rw-r--r-- or -rwxr-xr-x

Command

Numeric

chmod 755 file

Symbolic

chmod u=rwx,g=rx,o=rx file

ls -l shows

-rwxr-xr-x
Common modes

How to calculate chmod permissions

  1. 1Tick the Read, Write and Execute boxes for Owner, Group and Others. The digit for each row is shown on the right.
  2. 2Or type an octal mode such as 755 or 0644 into Octal, or paste a string like rwxr-xr-x or a full ls -l mode like -rw-r--r-- into Symbolic.
  3. 3Add setuid, setgid or the sticky bit if you need them; the octal mode gains a fourth leading digit.
  4. 4Enter the file or directory name and copy the numeric or symbolic chmod command. Common modes like 644, 755 and 600 are one click away.

How Unix permissions add up

Linux file permissions work the same way as on macOS and other Unix-like systems: every file has three sets of permissions, one for the owner (u), one for the file's group (g) and one for everyone else (o). Each set has three bits. Read is worth 4, write is worth 2 and execute is worth 1, and adding them gives a single digit from 0 to 7. Read plus write is 6, read plus execute is 5, and all three is 7. Put the three digits side by side and you have the octal permissions, so 755 means the owner has 7 (rwx) and group and others have 5 (r-x).

The symbolic form that ls -l prints is the same information spelled out: rwxr-xr-x is 755 and rw-r--r-- is 644. For directories, execute means permission to enter the directory and reach files inside it, and read means permission to list its contents, which is why directories are usually 755 and plain files 644.

An optional fourth digit in front holds the special bits. setuid (4) makes an executable run with its owner's privileges, which is how passwd can update a root-owned file. setgid (2) does the same for the group, and on a directory makes new files inherit the directory's group, which is handy for shared project folders. The sticky bit (1) on a directory, as on /tmp with mode 1777, means only a file's owner can delete or rename it. In ls output these replace the execute slot as s or t, or as S or T when the underlying execute bit is off.

chmod also accepts relative symbolic arguments like g+w or o-r, which change individual bits rather than setting them. As a Unix permissions calculator this tool works in absolute terms, so the symbolic command it shows, like u=rwx,g=rx,o=rx, sets each class exactly and works the same on GNU and BSD chmod.

When developers reach for it

Fixing 'Permission denied'

Work out which bit is missing when a deploy script can't execute, or a web server can't read a file.

Locking down secrets

Set SSH private keys, .pem files and .env files to 600 or 400 so only the owner can read them; ssh refuses keys that are readable by others.

Dockerfiles and CI

Use it as a chmod command generator for the RUN line that makes entrypoint scripts and binaries executable, without guessing at the octal digits.

Shared directories

Combine group write with setgid (2775) so everyone in a team group can work in a directory and new files keep the group.

Frequently asked questions

What does chmod 755 mean?

+

The owner can read, write and execute (7), and the group and everyone else can read and execute (5). It's the usual mode for directories and scripts, shown by ls -l as rwxr-xr-x.

What does chmod 644 mean?

+

The owner can read and write (6), and the group and everyone else can only read (4). It's the standard mode for regular files like HTML, config and source files, shown as rw-r--r--.

Why is chmod 777 a bad idea?

+

It lets every user on the system modify or replace the file, and on a directory lets anyone delete files inside it. It usually hides an ownership problem; fixing the owner with chown and using 755 or 775 is safer.

What permissions should an SSH private key have?

+

600 (rw-------) or 400 (r--------). OpenSSH refuses to use a private key that other users can read, and the ~/.ssh directory itself should be 700.

What do the s and t letters in ls -l mean?

+

s in the owner or group execute slot means setuid or setgid is set; t in the others slot means the sticky bit is set. A capital S or T means the special bit is set but the execute bit underneath it isn't.

How do I convert rwx to octal?

+

Split the string into three groups of three, score each letter (r = 4, w = 2, x = 1, - = 0) and add up each group. rwxr-x--- becomes 7, 5 and 0, so 750. You can also paste the string into Symbolic and read the octal value.