chmodlinux permissionsrwxlinux

How chmod Works on Linux: From Octal to Symbolic Notation

Guide to understanding Linux permissions (rwx), converting between octal notation (755, 644) and symbolic, and choosing the right permission for each case.

August 22, 2026·6 min read

chmod 755 script.sh is one of those commands everyone copy-pastes at some point without fully understanding what that number means. It works, so no one stops to break it down, until one day you need a different permission (for example, a file that's read-only for everyone except you) and copy-paste stops being enough.

The three permission types: read, write, execute

On Linux, every file or folder has three possible permissions:

  • r (read): view a file's content, or list a folder's contents.
  • w (write): modify a file, or create/delete files inside a folder.
  • x (execute): run a file as a program or script, or enter a folder (without x on a folder, you can't access its contents even with r).

The three groups of users

Each of those three permissions applies separately to three different groups:

  • Owner: the user who owns the file.
  • Group: users belonging to the group assigned to the file.
  • Others: everyone else on the system.

How this translates into numbers (octal notation)

Each permission has a value: r = 4, w = 2, x = 1. For each group (owner, group, others), you add up the permissions it has: for example, read + write + execute = 4+2+1 = 7. With no permission, it's 0.

The result is three digits, one per group:

  • 755: owner with everything (7 = rwx), group and others with only read and execute (5 = r-x). The typical case of an executable script anyone can run but only you can modify.
  • 644: owner with read and write (6 = rw-), group and others with only read (4 = r--). The typical case of a config file or document: you edit it, others only read it.
  • 777: everyone with every permission. Rarely what you actually need; it's usually a sign it was used as a "quick fix" without considering the security risk of letting anyone modify or execute that file.

How to use the chmod calculator

  1. Check the boxes for read, write and execute for each of the three groups (owner, group, others).
  2. The tool automatically calculates the corresponding octal value (755, 644...) and symbolic notation (rwxr-xr-x).
  3. Copy the complete chmod command, ready to use in your terminal.

You can do it free with the chmod calculator on this site.

Why 777 is almost never the right answer

Giving full permission to "others" means any user on the system (or, on a misconfigured server, potentially any compromised process) can read, modify or execute that file. It's a fix that "works" to make a permissions error go away, but it almost always signals that the real problem (a misconfigured user or group) wasn't solved, just avoided. The correct configuration is almost always more restrictive and specific: give exactly the permission needed to the correct group, not open everything to everyone.

Frequently asked questions

What does it mean that a folder needs the x permission besides r? Without x, you can't "enter" the folder or access what's inside, even if you have r to list its names; x on folders works as a "transit permission", not execution in the sense of a program.

What's the right permission for a script only I should run? 700 (rwx for the owner, nothing for the rest) if you don't want anyone else to even read it.

Why doesn't my script run even though it has read permission? Because running specifically requires the x permission; reading and executing are independent permissions.

Do I need to memorize the octal values? Not if you use a visual calculator: just understand what permission you want for each group and the conversion happens automatically.


Convert Linux permissions between octal and symbolic for free with the chmod calculator, with visual checkboxes and a ready-to-copy command.

Try it without code

chmod Calculator

Convert Linux permissions between octal and symbolic.

Open chmod Calculator

Built by

Miguel Ángel Colorado Marin (MACM)

Full-Stack Developer · Guadalajara, España

I develop web apps, digital tools and full projects — from design to deployment.

Contact me