chmod calculator

Interactive chmod Calculator

Build Linux file permissions with checkboxes, or paste an octal value (like 755 or 4755) to decode it instantly.

Supports special bits in symbolic mode: s/S and t/T.

Permission Owner (u) Group (g) Others (o)
Read (4)
Write (2)
Execute (1)
Special Bit Enabled Octal Weight Description
setuid 4 Run file as owner
setgid 2 Run file as group / inherit group on dirs
sticky 1 Restricted delete behavior on dirs
Octal: 755
Symbolic: rwxr-xr-x
Command: chmod 755 path/to/file
Special bits: none

What is chmod?

chmod stands for “change mode,” and it is one of the most important Linux and Unix commands for controlling file and directory access. Every file has a permission set that determines who can read it, modify it, or execute it. With chmod, you can update those rules safely and precisely.

If you have ever seen values like 644, 755, or 777, those are octal permission codes. This calculator helps you translate between octal and symbolic formats without memorizing every bit pattern.

How Linux permissions work

Three user classes

  • Owner (u): The user who owns the file.
  • Group (g): Users in the file’s group.
  • Others (o): Everyone else on the system.

Three basic permissions

  • Read (r): View file content, or list directory contents.
  • Write (w): Modify file content, or create/delete inside a directory (with execute).
  • Execute (x): Run a file as a program/script, or enter/traverse a directory.

Octal permission math

Each class (owner, group, others) gets a digit from 0 to 7:

  • Read = 4
  • Write = 2
  • Execute = 1

Add the values for each class:

  • 7 = 4 + 2 + 1 = rwx
  • 6 = 4 + 2 = rw-
  • 5 = 4 + 1 = r-x
  • 4 = r--
  • 0 = ---

So 755 means owner rwx, group r-x, others r-x.

Special permission bits (4-digit chmod)

When a permission has four digits (for example 4755), the first digit encodes special behavior:

  • 4 = setuid
  • 2 = setgid
  • 1 = sticky

You can combine them. For example:

  • 2755 → setgid + 755
  • 1777 → sticky + 777 (common on /tmp)

Common chmod values and use cases

Files

  • 644: Typical text/config file (owner read/write, others read only).
  • 600: Private file (owner only), useful for secrets and SSH keys.
  • 755: Executable script or binary intended to be run by others.

Directories

  • 755: Standard public directory permissions.
  • 750: Shared internally with a specific group.
  • 700: Fully private directory.

Security tips for safer permissions

  • Prefer least privilege: grant only what is necessary.
  • Avoid 777 unless absolutely required and temporary.
  • Use chown and chgrp with chmod for proper ownership control.
  • For deployment scripts, set predictable defaults and audit with ls -l.
  • Be careful with recursive changes (chmod -R) on production systems.

Symbolic chmod syntax quick reference

Besides octal, you can edit permissions symbolically:

  • chmod u+x script.sh → add execute to owner
  • chmod g-w file.txt → remove write from group
  • chmod o=r file.txt → set others to read-only
  • chmod a+r project.md → add read for all

Final thoughts

A solid understanding of chmod is foundational for Linux administration, web hosting, DevOps, and secure software delivery. Use the calculator above whenever you want a quick, error-resistant way to map between octal and symbolic modes, including special bits like setuid, setgid, and sticky.

🔗 Related Calculators