Using the chmod Calculator
This page turns a three-digit permission into the nine-character symbolic form used by chmod. The first digit is the owner, the second is the group, and the third is everyone else. Inside a digit, 4 means read, 2 means write, and 1 means execute. 755 is rwxr-xr-x. 644 is rw-r--r--. 000 is ---------.
Each digit must be 0, 1, 2, 3, 4, 5, 6, or 7. A digit of 8 is rejected. Four digits are rejected, including a leading special-bit digit. The page does not set a setuid bit, a setgid bit, or a sticky bit, and it does not change any file on the computer where you are reading this. It only translates the three digits you type.
The headline is the symbolic mode. The lines show the numeric mode and the owner, group, and other trios separately. Copy keeps the sentence that names the mode and the three trios.
What the Nine Characters Mean
The nine characters are three groups of three. Each group is read, write, and execute, in that order. A letter means the bit is on. A hyphen means it is off. rwx is 7, because 4 plus 2 plus 1 is 7. r-x is 5, because write is off. rw- is 6. r-- is 4. --x is 1. --- is 0.
755 splits into 7, 5, and 5. Owner is rwx, group is r-x, and other is r-x. The joined form is rwxr-xr-x. 644 splits into 6, 4, and 4. Owner is rw-, group is r--, and other is r--. The joined form is rw-r--r--. 000 is three empty trios, nine hyphens.
The numeric line repeats the three digits you typed, so a copied result still shows both forms. Reset puts 755 back in the field. The page does not remember a previous mode after a reset.
How a Digit Becomes Letters
The page tests the digit with the three bit values. If the 4-bit is set, the first character is r. If the 2-bit is set, the second character is w. If the 1-bit is set, the third character is x. Otherwise the character is a hyphen. The tests are independent, so 3 is -wx, 2 is -w-, and 6 is rw-. You do not need a lookup table beyond those three bits.
The same tests run on each of the three digits. Nothing in the owner digit changes the group digit. 750 is rwxr-x---, because the last digit contributes three hyphens. 701 is rwx-----x. Reading the headline from the left, characters 1–3 are the owner, 4–6 are the group, and 7–9 are everyone else.
An identifier for a record is a different kind of string. The UUID Generator draws a random identifier. It does not encode read, write, and execute. Use it when you need an identifier. Use this page when you have a three-digit mode.
What Is Left Out
Special bits are left out. A four-digit mode such as 1755 is rejected, even though some chmod commands accept a leading 1, 2, or 4 for sticky, setgid, or setuid. This page is the three permission digits only. Add those special bits in the command yourself if you need them, and do not expect this headline to include them.
The page does not accept symbolic input. Typing rwxr-xr-x into the field is rejected, because the field expects digits. The translation runs from digits to letters, not the other way. The page also does not accept a command line. "chmod 755 file" is not parsed, and no file name is read.
Nothing is applied to a directory or a file. There is no path field. If you wanted to inspect a real file, use the tools on that computer. This page will not claim it did.
Worked Modes
Enter 755. The headline is rwxr-xr-x. Owner is rwx, group is r-x, and other is r-x. Enter 644. The headline is rw-r--r--. Owner can read and write, and everyone else can only read. Enter 000. The headline is ---------. No one is granted read, write, or execute by these three digits.
Enter 750 and read rwxr-x---. Enter 777 and read rwxrwxrwx. Enter 7555. The page rejects it, because there are four digits. Enter 758. The page rejects it, because 8 is not a permission digit. Enter 75. The page rejects it, because two digits are not three.
Cleaning line breaks in a note is a different text job. The Remove Line Breaks tool joins lines of prose. It does not interpret permission bits. Use it for a paragraph. Use this page for a mode.
Limits of a Three-Digit Mode
A mode is not a full access policy. It does not name a user, a group, or an owner. It does not show access-control lists. Two files can both be 644 and still be owned by different accounts. This page never sees the owner name, because you did not type one.
Execute on a directory means something different from execute on a file, and the page does not ask which one you have. The letters are the same. The headline will not add the word "directory." If you are setting a directory, keep that fact in your own note next to the copied sentence.
Windows permission dialogs do not use these nine characters. Translating 755 into a Windows checkbox list is not what this page does. Stay with the Unix-style mode the digits describe.
Common Mistakes
The frequent miss is to read 755 as "seven hundred fifty-five" and then to look for that decimal in a permission dialog. The digits are octal bit fields. 7 is three bits, not a count of seven permissions. The symbolic headline is the form to compare with ls-style output.
Another miss is to add a leading zero as a fourth digit. 0755 has four characters. This page rejects it. Type 755. The leading zero in a programming literal is still the same three permission bits, but the extra character does not belong in this field.
Counting sentences in a note will not check a mode. The Sentence Counter counts sentences in prose. It does not split a digit into read, write, and execute. Use it for prose. Use the bit tests on this page for a mode.
Reading a Mode Before You Use It
Say the three trios out loud before you put the digits in a command. For 644, that is "owner read and write, group read, others read." If you wanted group write as well, you wanted 664, which is rw-rw-r--, not 644. The page will show 664 correctly if you type it. It will not guess that you meant group write.
Write the symbolic form next to the command you plan to run, and include the file name in your notes, not in this field. The page has nowhere to put a path, which is intentional. A copied headline of rwxr-xr-x does not name a target.
If two people disagree about a mode, calculate it here and compare the nine characters with the nine characters in the directory listing. A mismatch of one hyphen is a real mismatch. Do not round a digit to make them agree.
Walking the Bits
It helps to build one digit from nothing. Start at 0, which is ---. Add read and you have 4, which is r--. Add write to that and you have 6, which is rw-. Add execute to that and you have 7, which is rwx. The order of adding does not matter. Start at 0, add execute, and you have 1, which is --x. Add read and you have 5, which is r-x. That 5 is the group digit and the other digit in 755. Seeing 5 as "read plus execute" is the whole translation. Seeing 5 as the decimal number five, with no bit meaning, is the mistake the symbolic headline is there to prevent.
Do the same for a full mode by writing the three digits in a column and the three trios beside them. 6 becomes rw-. 4 becomes r--. 4 becomes r--. Push the trios together without spaces and you have rw-r--r--, which is 644. If you insert a space for readability in a note, remove it before you compare the string with a directory listing. The headline on this page has no spaces. The separate owner, group, and other lines are where the spacing lives.
A few modes show up so often that they are worth memorizing after you have built them once. 755 is owner everything, everyone else read and execute. 644 is owner read and write, everyone else read. 600 is owner read and write, and hyphens for group and other. 700 is owner everything, and hyphens for the rest. Type each of those and read the headline before you trust the memory. The page is the check, not a poster.
Checking a Digit by Hand
Subtract the bits you can see. For a trio of rwx, the digit is 4 plus 2 plus 1. For r-x, drop the 2, leaving 5. For rw-, drop the 1, leaving 6. For r--, leave 4. If your subtraction disagrees with the digit on the numeric line, you misread a hyphen. The numeric line is the input, so the disagreement is in the reading, not in a second calculation.
A paragraph count is unrelated to permission bits. The Paragraph Counter counts paragraphs in text. It does not decode a mode. Use it for text. Use the bit subtraction above to audit this page.
Building a Few More Modes
Build 640 by hand before you type it. 6 is rw-. 4 is r--. 0 is ---. Joined, that is rw-r-----. The owner can read and write, the group can read, and others have none of the three bits. Type 640 and compare the headline with that string, character by character, including the hyphens. Then build 604. 6 is rw-, 0 is ---, 4 is r--. Joined, that is rw----r--. The group trio is empty and the other trio is read-only. These two modes are easy to swap if you rush. The page will not swap them. The order is owner, then group, then other, left to right.
Checking the Calculator
Enter 755 and confirm rwxr-xr-x. Enter 644 and confirm rw-r--r--. Enter 000 and confirm nine hyphens. Enter 758 and confirm the page rejects the digit. Enter 7555 and confirm four digits are rejected.
Markup for alternate page languages is a different generator. The Hreflang Generator builds link elements for language versions of a page. It does not encode file permissions. Use it for those links. Use this page for a three-digit mode.