Handytool
Developer guide7 წთ კითხვაგანახლებული 25 ივნ. 2026

Linux permissions

What chmod 755 really means.

The three digits in a chmod command are not random. Each one is a sum of read, write, and execute values for a different group of users. Once you see the pattern, you can read any mode at a glance.

მთავარი მიღებული

  • 01The three digits set permissions for the owner, the group, and everyone else, in that order.
  • 02Each digit is the sum of read (4), write (2), and execute (1) — so 7 = all three, 5 = read + execute.
  • 03755 is the standard for folders and programs; 644 is standard for ordinary files; 777 is almost always a mistake.

Three digits, three audiences

On Linux and macOS, every file and folder carries permissions for three separate groups of people. From left to right, the three digits in a mode like 755 apply to: the owner (the user who owns the file), the group (a set of users who share access), and others (literally everyone else on the system). The order never changes — owner, group, others.

So 755 says: give the owner the permission described by 7, give the group the permission described by 5, and give everyone else the permission described by 5. To understand the whole thing, you only need to know what a single digit means. Then you read the same rule three times.

How each digit is built: 4, 2, 1

Each digit is a sum of up to three values. Read access is worth 4, write access is worth 2, and execute access is worth 1. Add together the permissions you want and you get a single digit from 0 to 7. Because 4, 2, and 1 are powers of two, every combination produces a unique total — there is never any ambiguity.

Work through the digit 7: 4 (read) + 2 (write) + 1 (execute) = 7, so 7 grants everything. The digit 5 is 4 (read) + 1 (execute) = 5, which grants read and execute but not write. The digit 6 is 4 + 2 = 6: read and write, but not execute. The digit 4 is read-only. The digit 0 grants nothing at all.

Applied to 755, that unpacks to: the owner gets 7 (read, write, execute — full control), while the group and others each get 5 (read and execute, but no ability to change the file). This is exactly what you want for a program or a folder that others should be able to use but not modify.

The permission modes you will actually use

Nearly all day-to-day work comes down to a handful of modes. Here is what each one means and when to reach for it.

  • 01755 = rwxr-xr-x — owner can read, write, and run; everyone else can read and run. The default for folders, scripts, and executables.
  • 02644 = rw-r--r-- — owner can read and write; everyone else can only read. The default for ordinary files like HTML, text, and images.
  • 03700 = rwx------ — owner has full control; nobody else can even look. Use for private folders and personal scripts.
  • 04600 = rw------- — owner can read and write; everyone else is locked out. Ideal for private keys and config files with secrets.
  • 05775 = rwxrwxr-x — owner and group can write; others can read and run. Common for shared project directories.
  • 06777 = rwxrwxrwx — everyone can do everything. A security red flag; almost never the right answer.

How to work out a chmod value

Instead of memorizing octal, describe the access you want and let the calculator produce the number and the rwx string.

  1. 01

    Open the chmod calculator

    Go to Handytool's chmod calculator. It runs entirely in your browser.

  2. 02

    Tick the boxes

    Check read, write, or execute for owner, group, and others based on who should be able to do what.

  3. 03

    Read the result

    The tool shows the numeric mode (like 755) and the symbolic string (like rwxr-xr-x) side by side, so you can copy whichever your command needs.

  4. 04

    Copy the command

    Grab the ready-made chmod command and paste it into your terminal to apply the permissions.

One catch: execute means different things

On a file, the execute bit means "this can be run as a program." On a folder, execute means something different: "you are allowed to enter this directory and access what is inside." That is why folders normally get 755 rather than 644 — without the execute bit, you can list a folder's name but cannot open it or reach the files within.

This is the reason a freshly uploaded folder full of readable files can still throw "permission denied." The files may be 644 and perfectly readable, but if the folder itself lacks the execute bit for the group or others, nobody can traverse into it. Set directories to 755 and their contents to 644 and most of these puzzles vanish.

chmod FAQ

What does chmod 755 mean?

It gives the owner full read, write, and execute permission (7), and gives the group and everyone else read and execute only (5 and 5). It is the standard mode for folders, scripts, and programs that others should be able to use but not change.

What is the difference between 755 and 644?

755 includes the execute bit, so the file can be run and folders can be entered. 644 has no execute bit — it is read and write for the owner, read-only for everyone else, which is right for ordinary data files.

Is chmod 777 safe?

Rarely. It lets every user and process read, modify, and replace the file, which is a security risk on any shared system. Prefer the narrowest mode that solves the problem, usually 755 or 644.

How do I read a mode like rwxr-xr-x?

Read it in three groups of three: rwx (owner) r-x (group) r-x (others). A letter means the permission is granted, a dash means it is not. rwxr-xr-x is the symbolic form of 755.

დაკავშირებული ინსტრუმენტები

გაგრძელება Developer ინსტრუმენტი

Developer ინსტრუმენტი