Introduction
The Chmod Calculator helps you set file permissions on Linux and Unix systems. Chmod is a command that controls who can read, write, or run a file. Every file has three groups of users: the owner, the group, and others. Each group can be given different levels of access.
This tool lets you build chmod commands in two ways. You can click checkboxes in the permission matrix, or you can type an octal value like 755 or a symbolic notation like rwxr-xr-x. All fields stay in sync, so a change in one spot updates everything else right away. The calculator also handles special permission bits like setuid, setgid, and the sticky bit.
Once you pick your permissions, the tool gives you a ready-to-use terminal command. You can add flags like -R for recursive changes or -v for verbose output. A step-by-step breakdown shows you the math behind each octal digit, so you can learn how chmod values work instead of just copying them. If you also manage network configurations on these systems, our Subnet Calculator and CIDR Calculator are useful companion tools for IP addressing tasks.
How to Use Our Chmod Calculator
Enter your desired file permissions using checkboxes, octal numbers, or symbolic notation. The calculator will show you the matching chmod command, permission summary, and a step-by-step breakdown of how the value is built.
Quick Presets: Click any preset button like 644 or 755 to instantly load a common permission setup. This is the fastest way to get started.
Permission Matrix: Check or uncheck the boxes for Read, Write, and Execute under Owner, Group, or Others. The octal digit for each column updates right away.
Special Permission Bits: Toggle Setuid, Setgid, or Sticky Bit on or off if your file needs advanced permissions. Most users can leave these off.
Octal / Numeric Field: Type a 3-digit or 4-digit octal value like 755 or 4755. The checkboxes and all outputs will sync to match. Turn on the Show 4-digit toggle to always display the leading special-bit digit. If you frequently work with other numeral systems, our Hex Calculator can help you convert between hexadecimal, decimal, and octal values.
Symbolic Notation Field: Type a 9-character string like rwxr-xr-x using the letters r, w, x, and dashes. Use s, S, t, or T in the execute spots to set special bits. All other fields update instantly.
Filename / Path: Type the name or path of your file or folder. This text is used in the generated chmod commands shown below.
Output Mode: Pick Default, Verbose (-v), Changes (-c), or Silent (-f) to add a flag that controls what chmod prints when it runs.
Command Modifiers: Check Recursive (-R) to apply permissions to all files inside a folder. Check Preserve Root to block changes to the root directory. Check Reference File to copy permissions from another file instead of setting them manually.
Calculate & Reset: Click Calculate to refresh all results, or click Reset to return every field to its default value of 755.
Results: After you set your permissions, the calculator shows the ready-to-use octal and symbolic chmod commands with a copy button, a binary breakdown, a permission summary for each user class, an ls -l preview for files and directories, and a step-by-step solution that explains the math behind each octal digit.
What Is Chmod and How Do File Permissions Work?
Chmod stands for "change mode." It is a command used in Linux and Unix systems to set who can read, write, or run a file. Every file and folder on these systems has a set of permissions that controls access. Chmod lets you change those permissions.
The Three Permission Types
Each file has three basic permissions:
- Read (r) — Allows viewing the contents of a file or listing a folder.
- Write (w) — Allows changing or deleting a file or adding files to a folder.
- Execute (x) — Allows running a file as a program or entering a folder.
The Three User Classes
Permissions are set for three groups of people:
- Owner (u) — The person who created the file.
- Group (g) — A set of users who share access.
- Others (o) — Everyone else on the system.
How Octal Numbers Work in Chmod
Chmod uses numbers to represent permissions. Each permission has a value: read = 4, write = 2, and execute = 1. You add these values together to get a single digit for each user class. For example, read + write + execute = 4 + 2 + 1 = 7. Read + execute = 4 + 1 = 5. Read only = 4.
A full chmod value has three digits, one for each class. So chmod 755 means the owner gets full access (7), while the group and others can read and execute but not write (5). Octal is a base-8 number system. If you need to work with base-16 values as well, our Hex Calculator handles hexadecimal conversions. For base-2 arithmetic, try the Binary Calculator.
Symbolic Notation
You can also write permissions as a nine-character string like rwxr-xr-x. The first three characters are for the owner, the next three are for the group, and the last three are for others. A dash (-) means that permission is turned off.
Special Permission Bits
Linux also has three special bits that add extra behavior:
- Setuid (4000) — Runs a file with the permissions of the file's owner, not the person running it.
- Setgid (2000) — Runs a file with the permissions of the file's group. On folders, new files inherit the group.
- Sticky Bit (1000) — On shared folders, only the file's owner can delete their own files. The
/tmpfolder is a common example.
When special bits are used, the chmod value becomes four digits, like 1755.
Common Chmod Permission Examples
- 644 — Owner can read and write. Everyone else can only read. Good for regular files.
- 755 — Owner has full access. Everyone else can read and execute. Good for scripts and programs.
- 700 — Only the owner has any access. Good for private files and folders.
- 600 — Owner can read and write. No one else has access. Good for sensitive files.
- 777 — Everyone has full access. This is a security risk and should be avoided in most cases.
Why File Permissions Matter
Setting the right permissions keeps your files safe. If permissions are too open, anyone on the system could read, change, or delete your data. If they are too strict, other users or programs that need access will not work correctly. Always give the least amount of access needed to get the job done.
File permissions are just one part of managing a Linux or Unix server. Administrators often configure permissions alongside networking tasks like subnetting and IP planning. If you work with network infrastructure, our Subnet Calculator, CIDR Calculator, VLSM Calculator, and Bandwidth Calculator can help you plan and troubleshoot your network setup. For storage reliability planning, check out the RAID Calculator to compare redundancy configurations for your drives.