Command Palette

Search for a command to run...

How Chmod Permissions Work: 755, 644 and Octal

How Chmod Permissions Work: 755, 644 and Octal

T
Toolz Team
|Sep 13, 2026|15 קריאה דקות

חלק מאוסף קִנוּחַ

מחשבון CHMOD

המר הרשאות קובץ Unix בין תיבות סימון אוקטליות, סמליות ו-rwx. החלף קריאה, כתיבה וביצוע עבור בעלים, קבוצה ואחרים, בתוספת setuid, setgid ודביק, והעתק את פקודת chmod - הכל בדפדפן שלך.

השתמשו ב־מחשבון CHMOD

The first time I locked myself out of a file on a production server, I was following a tutorial that said "set it to 600" without explaining what 600 meant. I typed the command, the deploy script could no longer read the file, and I spent twenty minutes working out that I had removed group read access that the web server process needed. The number was not wrong for a private key. It was wrong for that file, and I had no intuition for why, because I had treated the permission as a magic incantation rather than a value I understood.

Unix file permissions are one of those topics that look intimidating and are simple once someone draws the picture. Three classes of user, three kinds of access, and a small amount of arithmetic that turns checkboxes into the numbers chmod expects. The trouble is that the two representations, the numeric mode like 755 and the symbolic mode like rwxr-xr-x, look nothing alike, and converting between them in your head is a skill nobody enjoys practising.

The Chmod Calculator does the conversion for you and, more usefully, shows all three views at once. Toggle a checkbox and the octal number, the symbolic string, and the ready-to-run chmod command all update together. It is the tool I wish I had the day I broke that deploy, because seeing the permission from three angles at the same time is what builds the intuition that a single number never will.

TL;DR: Unix permissions cover three classes (owner, group, others) with three bits each (read=4, write=2, execute=1). A numeric mode like 755 adds those values per class; a symbolic mode like rwxr-xr-x spells them out. This calculator converts between octal, symbolic, and rwx checkboxes in real time, handles the setuid, setgid, and sticky special bits, and generates the exact chmod command. It runs entirely in your browser with no signup.

What problem does a chmod calculator solve?

The core difficulty is that the same permission has two faces that share no visual resemblance. Documentation and ls -l show you rwxr-xr-x. The chmod command usually wants 755. Moving between them requires converting each three-letter group into a digit by adding up read, write, and execute, and doing that reliably under pressure, on a server, with a typo one keystroke away from a lockout, is exactly when a person makes mistakes.

A calculator removes the arithmetic and, just as importantly, removes the ambiguity. When you can see that 755 is rwxr-xr-x is "owner: read, write, execute; group and others: read, execute," the permission stops being a number you memorised and becomes a statement you can read. That is the difference between copying a mode from a tutorial and knowing whether the mode is right for your file.

There is a safety angle too. Permissions are one of the few things where a small mistake has outsized consequences. Set a private key to 644 and any user on the box can read it. Set a web directory to 777 and you have handed write access to the world. A tool that spells out in plain English what a mode allows, next to the number, is a sanity check you run before you commit the change rather than after you have caused an incident. The same privacy-first, understand-before-you-act mindset runs through the data privacy online tools guide, and it applies to permissions as much as to anything you paste into a form.

How do Unix file permissions work?

Every file and directory on a POSIX system carries permissions for three classes of user. The owner is the account that owns the file. The group is a named set of users who share a level of access. Others is everyone else on the system. Each of those three classes has three independent bits: read, write, and execute.

What those bits mean differs slightly between files and directories, which is a detail that trips people up. On a file, read lets you view the contents, write lets you change them, and execute lets you run the file as a program. On a directory, read lets you list the entries, write lets you create and delete entries inside it, and execute lets you enter the directory and access files within it by name. That is why a directory almost always needs the execute bit set for any class that should be able to use it at all, even though "executing a directory" sounds odd. The calculator maps each of the nine bits to a checkbox, so you can see the full picture at a glance and toggle exactly the access you intend.

How are the octal permission numbers calculated?

This is the piece of arithmetic worth understanding once, because after that the numbers read themselves. Within each class, read is worth 4, write is worth 2, and execute is worth 1. Those three values were chosen because they are powers of two, which means every combination adds up to a unique total between 0 and 7. Here is the full mapping.

Octal digit Binary Symbolic Meaning
7 111 rwx read, write, execute
6 110 rw- read, write
5 101 r-x read, execute
4 100 r-- read only
3 011 -wx write, execute
2 010 -w- write only
1 001 --x execute only
0 000 --- no access

A full mode is three of these digits, in the order owner, group, others. So 755 reads as owner 7 (read, write, execute), group 5 (read, execute), others 5 (read, execute). The calculator does this addition in both directions: check the boxes and watch the digit appear, or type the digit and watch the boxes fill in. Doing it a few times in the tool is how the table above stops being something you look up and becomes something you know.

What do chmod 755 and chmod 644 mean?

These are the two modes you will use more than any other, so they are worth committing to memory, and the calculator is the fastest way to see why each one is the default for its job.

chmod 755 gives the owner full access (read, write, execute) and gives the group and others read and execute. It is the standard mode for directories and for scripts or programs that everyone should be able to run but only the owner should be able to change. The execute bit on group and others is what lets other users enter the directory or run the script.

chmod 644 gives the owner read and write, and gives the group and others read only, with no execute anywhere. It is the standard mode for regular files such as HTML pages, images, configuration that should be world-readable, and source files, where the owner edits and everyone else only needs to read. There is no reason for a plain text file to be executable, so 644 leaves that bit off.

The pattern to notice is that directories and executables get 755 while ordinary files get 644, and the only difference is the execute bit. Seeing those two modes side by side in the calculator, with the symbolic strings rwxr-xr-x and rw-r--r-- underneath, makes the relationship obvious in a way that memorising two numbers never does.

What are the setuid, setgid, and sticky bits?

Beyond the nine standard bits there are three special bits, set by an optional fourth digit at the front of the mode, and they are where permissions get genuinely subtle. The calculator exposes each as its own checkbox and folds the result into both the leading octal digit and the symbolic string, exactly as ls -l displays them.

The setuid bit, worth 4 in the special digit, makes an executable run with the privileges of its owner rather than the user who launched it. The classic example is the passwd command, which needs to write to a system file that ordinary users cannot touch. In a symbolic listing, setuid turns the owner's execute character into s, so 755 with setuid becomes rwsr-xr-x and the mode is written 4755.

The setgid bit, worth 2, does the same for the group, and on a directory it does something extra: new files created inside inherit the directory's group rather than the creator's primary group, which is what a shared project folder needs. It shows as s in the group's execute position.

The sticky bit, worth 1, applies mainly to directories. When set, only a file's owner can delete or rename that file inside the directory, even if others have write access to the directory. This is what keeps /tmp usable as a shared scratch space without users being able to delete each other's files. It shows as t in the others' execute position, so a world-writable temp directory is 1777, or rwxrwxrwt. When a special bit is set but the underlying execute bit is off, the letter is capitalised, S or T, and the calculator reproduces that exactly so its output always matches a real listing.

What is the difference between numeric and symbolic modes?

Both describe the same permissions; they are just two notations, and knowing when to use each saves friction. Numeric mode, the octal digits like 755, is compact and absolute. It sets every bit at once, which is why it is the form you see in most chmod examples and deployment scripts. Symbolic mode, the letters like rwxr-xr-x, is what ls -l prints, so it is the form you read when inspecting a system.

Symbolic notation also has a relative form that chmod accepts and the calculator does not need to generate but is worth knowing: chmod u+x file adds execute for the owner without touching anything else, and chmod go-w file removes write from group and others. That relative form is handy at the command line when you want to change one bit and leave the rest alone. The calculator deals in absolute modes, which is the right model when you are deciding what a file's permissions should be rather than nudging one bit, and it gives you the octal to type and the symbolic to verify against ls -l afterwards. For the authoritative behaviour, the POSIX specification for chmod and the file mode bits is the primary reference.

How the calculator keeps every view in sync

The design principle behind the tool is that there is one source of truth, the set of permission bits, and every representation is derived from it. Toggle a checkbox and the octal, symbolic, command, and plain-English description all recompute from the same state. Type a valid octal or symbolic value and the bits update, which flows back out to every other view. This means the three notations can never disagree, which is the entire point: a converter that could show 755 next to the wrong symbolic string would be worse than doing the math by hand.

The plain-English summary is the part I find myself reading most. It spells out, one line per class, exactly what the current mode allows, and it flags any special bit in words. Before I apply a permission on a real system, that sentence is the check that catches the difference between what I typed and what I meant. Keeping a fast, reliable converter like this next to the other developer utilities I use, the base64 converter and the hash generator among them, is part of the workflow described in the developer productivity tools guide, and the broader collection lives in the coding tools guide.

A quick workflow for getting permissions right

Here is how I use the tool in practice. When a tutorial or error message gives me a mode, I paste the octal into the calculator and read the plain-English summary to confirm it does what the context needs. When I am setting permissions from scratch, I start from a preset close to what I want, 644 for a file or 755 for a directory or script, then toggle individual bits and watch the description update until it says exactly what I intend. Then I copy the generated chmod command and run it. The whole loop takes seconds and it has kept me from more than one lockout since I stopped guessing at numbers.

The presets cover the modes that come up daily, and the special-bit checkboxes are there for the rarer cases when you genuinely need setgid on a shared directory or the sticky bit on a temp folder. If you also work with JSON, YAML, and other formats on the same servers, the JSON formatter and CSS formatter round out the set of small, client-side utilities that make routine work faster.

Frequently asked questions

What is a chmod calculator?

A chmod calculator converts Unix file permissions between numeric octal modes, symbolic rwx strings and individual read, write and execute settings. It gives you the exact chmod command for the permissions you want without manual octal math.

What does chmod 755 mean?

chmod 755 gives the owner read, write and execute (7), and the group and others read and execute (5 and 5). It is the common mode for scripts and directories: the owner can change them, everyone else can run or enter them but not modify them.

What does chmod 644 mean?

chmod 644 gives the owner read and write (6) and the group and others read only (4 and 4). It is the standard mode for regular files that should be editable by their owner and readable by everyone else.

How are octal permission numbers calculated?

Each permission class is one octal digit built by adding read (4), write (2) and execute (1). So 7 is read, write and execute, 6 is read and write, 5 is read and execute, and 4 is read only. The three digits are owner, group and others in that order.

What are the setuid, setgid and sticky bits?

They are special permission bits set by a fourth leading octal digit. setuid (4) runs a file with the owner privileges, setgid (2) runs it with the group privileges or shares the group on directories, and the sticky bit (1) lets only a file owner delete it inside a shared directory.

What is the difference between numeric and symbolic modes?

Numeric mode uses octal digits like 755. Symbolic mode uses letters like rwxr-xr-x, matching the ls -l listing. They describe the same permissions; this tool converts between them so you can use whichever the documentation or command expects.

Does the Chmod Calculator work on mobile?

Yes. The tool is fully responsive and works in any modern browser on phones, tablets and desktops. The conversions are identical regardless of the device you use.

Is the Chmod Calculator free?

Yes. It is completely free with no signup, no watermarks and no usage limits. All conversions happen in your browser and nothing is sent to a server.

Comments

0 comments

0/2000 characters

No comments yet. Be the first to share your thoughts!