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.
755rwxr-xr-xchmod 755 path/to/filenoneWhat 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 =rwx6= 4 + 2 =rw-5= 4 + 1 =r-x4=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 +7551777→ 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
777unless absolutely required and temporary. - Use
chownandchgrpwithchmodfor 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 ownerchmod g-w file.txt→ remove write from groupchmod o=r file.txt→ set others to read-onlychmod 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.