Chmod Calculator
Permissions
| Read (r) | Write (w) | Execute (x) | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
Special Permissions
Quick Presets
Result
chmod 644 filename
What Are Unix File Permissions?
Every file and directory on a Unix or Linux system carries a set of permissions that decide who is allowed to read it, change it, or run it. Permissions are divided across three classes of user: the file's owner (the user account that owns it), the file's group (a set of users who share access), and others (everyone else on the system). For each class, three independent flags can be turned on or off: read (r), write (w), and execute (x). This nine-bit model is the foundation of access control on virtually every Linux server, macOS machine, and shared web host.
The chmod command ("change mode") is how you set these permissions. It accepts permissions either in symbolic notation (such as -rwxr-xr-x, where each character shows whether a flag is set) or in numeric octal notation (such as 755), where read is worth 4, write is worth 2, and execute is worth 1. You add those values together for each user class to get a single digit, so rwx = 4 + 2 + 1 = 7, rw- = 6, and r-x = 5. A leading fourth digit can also be supplied for special permission bits.
How to Use This Chmod Calculator
Tick the read, write, and execute checkboxes for Owner, Group, and Others in the permissions grid, and the calculator instantly updates the octal value, the symbolic string, and a ready-to-run chmod command. You can also type a value directly into the Numeric (Octal) field — enter three or four octal digits and the checkboxes and symbolic notation update to match. The Quick Presets row offers one-click common values such as 644, 755, 600, and 777, and the Special Permissions checkboxes let you add SUID, SGID, or the sticky bit.
Each result has its own Copy button: copy the bare octal number, the symbolic string, or the full chmod 644 filename command to paste straight into your terminal. The Explanation panel describes in plain English exactly what each class can do, so you can confirm a value before applying it.
Real-World Use Cases
- Setting up a web directory — Apply
644to HTML, CSS, and image files and755to directories so the web server can read and traverse them without exposing write access. - Securing config files — Use
600on files holding database credentials or API keys so only the owning account can read them. - Making a script executable — Add the execute bit to turn a shell script into a runnable program, typically landing on
755or700. - Fixing "Permission denied" errors — Translate the permissions your application needs into the correct octal value and confirm it before running
chmod. - Learning and teaching — Toggle individual bits to see how symbolic and octal notation relate, a clear way to understand the permission model.
Tips for Setting File Permissions
- Avoid
777on web servers — granting write access to everyone is a common source of security breaches and is rarely necessary. - Directories almost always need the execute bit set, because
xon a directory means "may enter and traverse it," not "may run a program." - Prefer the most restrictive permission that still works; start tight and only loosen if something genuinely needs more access.
- Use
chmod -Rwith care — recursively applying a file value like644to a tree will strip the execute bit directories need. - Remember that permissions are only half the picture; ownership (set with
chown) determines which account counts as the owner and group.
Features
- Interactive permission grid — Toggle read, write, and execute for owner, group, and others.
- Bidirectional conversion — Type an octal value to set the checkboxes, or check boxes to build the octal value.
- Symbolic and numeric output — See both
-rwxr-xr-xstyle and755style notation at once. - Ready-to-copy command — Get a complete
chmodcommand plus individual copy buttons for each result. - Special permission bits — Set SUID, SGID, and the sticky bit, reflected correctly in both notations.
- Quick presets — One click applies common values like
644,755,600, and more. - 100% client-side — Your data never leaves your browser.
Frequently Asked Questions
What does chmod 755 mean?
755 gives the owner read, write, and execute (7 = 4 + 2 + 1), and gives the group and others read and execute but not write (5 = 4 + 1). It is the standard permission for directories and executable scripts, allowing everyone to read and run while only the owner can modify.
What is the difference between symbolic and numeric notation?
Symbolic notation spells out each flag as a character, like -rw-r--r--, where the dashes mark unset permissions. Numeric (octal) notation collapses each user class into a single digit by summing read (4), write (2), and execute (1), giving a compact value such as 644. Both describe the exact same permissions, and this calculator shows them side by side.
What are SUID, SGID, and the sticky bit?
These are special permission bits represented by the optional leading digit. SUID (4) makes an executable run with the file owner's privileges, SGID (2) makes it run with the group's privileges (and makes new files in a directory inherit its group), and the sticky bit (1) on a directory means only a file's owner can delete it, which is how shared folders like /tmp stay safe.
Why does the execute bit matter on directories?
On a directory, the execute bit does not run anything; instead it controls whether a user can enter the directory and access files inside it by name. A directory with read but not execute lets you list filenames yet not open them, so directories you want people to use normally almost always need the execute bit set.
What does the leading zero in 0644 represent?
The leading digit is the special-permissions field for SUID, SGID, and the sticky bit. A value of 0 means none of them are set, so 0644 is identical in effect to 644. A value like 4755 would turn on SUID in addition to the rwxr-xr-x permissions.
Is it safe to use chmod 777?
Generally no. 777 grants read, write, and execute to every user on the system, which means any account or compromised process can modify or replace the file. On shared hosting or public servers this is a serious risk; in almost all cases a more restrictive value such as 644, 755, or 600 achieves what you need without exposing the file to everyone.