How to use Chmod Calculator
- Select read, write and execute permissions for Owner, Group and Others using the grid or dropdowns.
- To read a mode you already have, enter 640, 0755, rw-r----- or -rw-r----- in Or read an existing mode. A valid entry updates the grid and replaces the three choices.
- Read the octal mode, symbolic permissions and explanation for each class. The shown command uses file as a placeholder; choose the intended path and permissions before running a command yourself.
Example: Chmod Calculator
Read the ordinary permission bits in mode 644 before using a file command.
Options
- Permission classes
- Owner refers to the owning account, Group to the file group, and Others to accounts outside those classes. Each digit combines read (4), write (2) and execute (1). For example, 6 is read plus write and 5 is read plus execute.
- Existing mode
- Enter three octal digits, an optional leading zero, or ordinary symbolic permissions such as rwxr-xr-x. An ls-style leading file-type character is accepted, but the result shows a regular-file dash and does not preserve that type.
- Four-digit mode
- The result adds a leading zero, such as 0644. Nonzero setuid, setgid or sticky bits and their symbolic forms are outside this calculator.
Supported inputs and limits
- Covers the nine ordinary owner, group and other permission bits.
- It does not calculate setuid, setgid, sticky bits, access control lists, recursive changes or effective access for a particular account.
- Directory permissions have different meanings from file permissions; the displayed command does not determine the target type.
- Ownership, parent-directory access and other system rules also matter.
- The calculator does not inspect or modify files, and its output is not a recommendation to apply a mode.
Where your input is processed
This tool does not upload your inputs. See the limits for anything saved on your device.
How nine bits turn into one octal digit
Each class gets three bits: read is worth 4, write is worth 2 and execute is worth 1. Add the bits a class holds and you get a digit from 0 to 7, which is why 6 means read and write without execute, and 5 means read and execute without write. Three digits cover the owner, the group and everyone else, and the symbolic form spells the same sums out as r, w and x with a dash where a permission is missing. Directories reuse the execute bit to mean enter, which is why a directory usually needs it even when nothing in it is ever run.
Questions about Chmod Calculator
What does 755 mean?
The owner has read, write and execute bits. The group and others have read and execute bits. Whether that mode is appropriate depends on what the file or directory needs and who should access it.
Should I use 777 to fix an access error?
Check the owner, group, required access and parent directories first. Mode 777 grants all nine ordinary permission bits, including write access for others. This calculator cannot determine the right permissions for your system.
Why does the result start with a dash?
The result uses a dash for a regular file followed by the nine permission characters. Even when you enter a directory-style mode such as drwxr-xr-x, the calculator converts only the permission bits.
Does calculating a mode change my file?
No. It shows the mode and a command with file as a placeholder. You must deliberately run a command on your own system to change anything.
What is the fourth digit for?
It represents the setuid, setgid and sticky bits, which have separate execution or directory rules. This page leaves that digit at zero and refuses modes that set those bits.