Home › Math & Science › Chmod Calculator
Chmod Calculator
Use this free chmod calculator to convert file permissions between octal numbers, symbolic form, and checkboxes. Type 755, type rwxr-xr-x, or tick the boxes — all three stay in sync — and the calculator explains the result in plain English, including the special setuid, setgid, and sticky bits.
How it works
On Linux and other Unix-like systems, every file and folder has a set of permissions that decide who can read it, change it, and run it. There are three groups of people — the owner, the group, and everyone else (others) — and each group gets three permissions: read, write, and execute. That makes nine switches in total, and the chmod calculator lets you flip them with checkboxes, type them as a three-digit octal number, or write them in symbolic form. However you enter them, the other two views update instantly.
The octal system is just addition. Read is worth 4, write is worth 2, and execute is worth 1, so each group's permissions add up to a single digit from 0 to 7. A 7 means read, write, and execute (4 + 2 + 1), a 6 means read and write (4 + 2), a 5 means read and execute (4 + 1), and a 0 means nothing at all. The three digits, in order, are owner, group, and others. So 755 means the owner gets 7 (everything), while the group and others each get 5 (read and execute, but no writing). The symbolic form spells the same thing out letter by letter: rwxr-xr-x, where a dash means that permission is missing.
Read, write, and execute mean slightly different things for files and folders. For a file, read lets you open it, write lets you change it, and execute lets you run it as a program or script. For a folder, read lets you list what is inside, write lets you create, delete, and rename files in it, and execute lets you enter the folder and reach the files inside at all. That is why folders are usually 755 while ordinary files are 644: a folder needs execute permission for anyone who should be able to open it, while a plain file does not need to be executable.
There are also three special bits, shown as an optional fourth octal digit in front of the usual three. Setuid (4) makes a program run with the file owner's privileges instead of the caller's — the classic example is the password command, which needs to edit a system file. Setgid (2) does the same for the group, and on a folder it makes new files inherit the folder's group. The sticky bit (1) on a folder, used on shared folders like /tmp, means only the owner of a file can delete or rename it, even though everyone can write into the folder. In symbolic form these show up as an "s" in the execute position (or "S" if execute is off) and a "t" in the others' execute position (or "T" if execute is off).
Common values are worth memorizing. 644 (rw-r--r--) is the default for files, 755 (rwxr-xr-x) is the default for folders and scripts, 700 (rwx------) keeps a folder completely private to its owner, 600 (rw-------) protects a private key or password file, and 777 (rwxrwxrwx) lets absolutely everyone do everything — which is almost always a mistake on a shared server or website. If a web page shows a "403 Forbidden" error, the cause is often permissions that are too strict; if a site gets defaced, they were often too loose.
Worked example
You are setting up a website and need to know what 755 means, and what octal number matches the symbolic string rwxrw-r--.
Step 1: Split 755 into owner 7, group 5, others 5.
Step 2: Decode 7 — 4 + 2 + 1, so read, write, and execute.
Step 3: Decode 5 — 4 + 1, so read and execute, no write.
Step 4: The symbolic form is rwx for the owner, r-x for the group, r-x for others: rwxr-xr-x.
Step 5: Now decode rwxrw-r-- — owner rwx = 4 + 2 + 1 = 7, group rw- = 4 + 2 = 6, others r-- = 4, so the octal value is 764.
Type 755 in the calculator and it shows rwxr-xr-x with the plain-English description "owner can read, write, and execute; group can read and execute; others can read and execute." Type rwxrw-r-- in the symbolic box and it shows 764. Try the presets too: 644 for a normal file, 700 for a private folder, and 1755 to see the sticky bit appear as a "t" at the end.
FAQ
What does chmod 755 mean?
Chmod 755 means rwxr-xr-x: the owner can read, write, and execute, while the group and others can only read and execute. The 7 is read plus write plus execute (4 + 2 + 1), and each 5 is read plus execute (4 + 1). It is the standard permission for folders and scripts that everyone needs to run.
What does chmod 644 mean?
Chmod 644 means rw-r--r--: the owner can read and write, while the group and others can only read. The 6 is read plus write (4 + 2), and each 4 is read only. It is the standard permission for ordinary files like documents, images, and web pages.
How do octal permissions work?
Each permission digit is the sum of three values: read is 4, write is 2, and execute is 1. So 7 means read, write, and execute (4 + 2 + 1), 6 means read and write (4 + 2), 5 means read and execute (4 + 1), and 0 means no permissions at all. Three digits cover owner, group, and others in that order.
What are setuid, setgid, and the sticky bit?
These are special permission bits shown as a fourth octal digit. Setuid (4) lets a program run with the file owner's privileges, setgid (2) lets it run with the group's privileges and makes new files in a folder inherit the folder's group, and the sticky bit (1) on a folder means only the file's owner can delete or rename it. They appear as s, s, and t in the symbolic form.
What is the difference between chmod 755 and 777?
With 755 (rwxr-xr-x) only the owner can change the file, while everyone can read and run it. With 777 (rwxrwxrwx) absolutely everyone can read, write, and execute it, which is a security risk. Never use 777 on a live website or server unless you fully understand the danger, because any user or script could then modify your files.