Chmod values for a file are expressed as a string of three or four octal digits in which each digit is the sum of 4 for read, 2 for write, and 1 for execute or directory search, so a value such as 755 simply records that the owner can read, write, and execute while the group and everyone else can read and execute. To find the chmod of a file you either read this digit string from a directory listing or convert it between two notations: the compact octal form used by the chmod command and the nine-character rwx form shown by ls and stat. The Chmod Calculator performs that translation in the browser with explicit handling for the special bits that change ownership behavior, so you can confirm exactly what a permission string means before you commit it to a script or a deployment manifest. Because the tool works on a text snapshot rather than a live file path, it is a review aid, not a way to inspect a server or modify storage; it converts what you already know about a file into every other notation you might need.

how to find chmod of a file
how to find chmod of a file

Reading the Digits: What 4, 2, and 1 Mean

Every ordinary chmod digit is the sum of three independent bits, and those bits always carry the same weight. Read contributes 4, write contributes 2, and execute or directory search contributes 1, so the digit can only range from 0 through 7. Adding the weights of the bits you want gives the digit; subtracting gives you which bits are missing. The digit 7 equals 4 plus 2 plus 1, so the owner has every ordinary permission. The digit 5 equals 4 plus 0 plus 1, so the group has read and execute but no write. The digit 0 equals nothing at all, which is useful for explicitly denying access to a class of users.

The three ordinary positions always represent owner, group, and others in that order. A typical value such as 644 means the owner can read and write, the owning group can read, and everyone else can read. When you see 700 the owner has full access while group and others get nothing, which is a common shape for private keys and personal scripts. Working out what a string like 750 means is the same routine: the 7 is read plus write plus execute, the 5 is read plus execute, and the 0 is no permissions.

Octal digitr + w + xSymbolicMeaning
00 + 0 + 0---No access
10 + 0 + 1--xExecute or search only
20 + 2 + 0-w-Write only
30 + 2 + 1-wxWrite and execute
44 + 0 + 0r--Read only
54 + 0 + 1r-xRead and execute
64 + 2 + 0rw-Read and write
74 + 2 + 1rwxRead, write, and execute

Octal vs. Symbolic Notation for the Same File

The same permission set can be written in two ways that carry exactly the same information. The octal form packs nine yes-or-no decisions into three digits and is the input the chmod command expects. The symbolic form spells out those nine decisions as r, w, x, or a hyphen, grouped into three triples for owner, group, and others. Converting 755 to symbolic gives rwxr-xr-x, and converting rwxr-xr-x back gives 755. Neither form is more correct than the other; they are two encodings of the same mode bits.

The symbolic form also has a slot for special bits in the execute positions. When the owner execute position shows s instead of x, it means setuid is set and execute is also set; S means setuid is set but execute is not. The group position follows the same lowercase or uppercase rule for setgid, while the others position uses t or T for the sticky bit. Preserving that case distinction is the only way to round-trip special bits through a text representation, which is one reason a calculator is more reliable than reading a printed list of values.

Convert a File's Chmod With the Calculator

The Chmod Calculator takes a complete permission snapshot in one direction and returns every other representation of it, including the canonical octal value, the nine-character symbolic string, and a per-position table. It runs entirely in the current tab and never receives a file path, so you can paste a value from a documentation page, a pull request, or a printed ls -l output and read what it really says.

  1. Open the Chmod Calculator and choose either octal-to-symbolic or symbolic-to-octal as the conversion direction.
  2. Type a complete octal value such as 755, or a four-digit value such as 4755 when special bits are present, in the strict form the field accepts (exactly three or four ASCII digits, no prefix or punctuation).
  3. For the reverse direction, type a complete symbolic string such as rwxr-xr-x or rwsr-xr-x with nine characters and no leading file-type dash.
  4. Review the canonical octal, the nine-character symbolic output, and the owner, group, and others permission table that the tool displays.
  5. Confirm the target file, its ownership, the presence of any special bits, and whether the value truly reflects the least privilege your service needs.
  6. Copy the chmod template only after that review, replace the FILE placeholder with the real path, and apply it from a shell or automation step.

If the input fails validation, the previous result and any copy status are cleared so you cannot act on a stale value. Editing the input or switching direction behaves the same way, and the clipboard action is guarded against a late asynchronous completion that could otherwise announce success after you have already moved on. The raw input has a fixed budget measured in UTF-16 code units, so the exact boundary is visible and the next unit past it returns an explicit budget error rather than being silently trimmed.

Special Bits: When the First Digit Is Not Owner

A four-digit chmod begins with a special-bit digit that sits in front of the three ordinary digits rather than replacing them. The first digit combines setuid as 4, setgid as 2, and sticky as 1, so 4755 means setuid is set together with the same owner, group, and others permissions as 755, and 2755 means setgid is set with the same three ordinary digits. A value such as 6755 carries both setuid and setgid, and 7755 carries all three special bits. An explicit leading zero such as 0755 is accepted and represents the same mode bits as 755; the canonical output simply omits the redundant zero when no special bit is set.

Special bitWeightExampleWhat changes
setuid44755Executable runs with the file owner's identity
setgid22755Executable runs with the file group's identity; on directories, new children inherit the group
sticky11755On a directory, only the entry owner can delete or rename a child

Special bits deserve operational care. A setuid or setgid executable can change the effective identity of a process, and a filesystem or security policy may clear or ignore those bits under particular ownership conditions. Sticky on a directory such as /tmp is what stops unrelated users from deleting one another's files. The calculator reports the requested mode bits but cannot promise that a given filesystem will retain or honor every bit, so treat the output as a review aid rather than a guarantee.

What a Chmod Value Does Not Tell You

Mode bits are only one part of access control. POSIX defines the bit positions, but whether a process actually reaches a file depends on ownership, access control lists, capabilities, mount options such as read-only file systems, application sandboxing, and other operating-system policy. A process also needs execute permission on every parent directory in the path before it can reach the file, which is a frequent surprise when a permission change still appears to do nothing. Umask affects the permissions requested when files are created; it is not an extra digit that the calculator silently applies to your input.

Prefer the least privilege the actual user and service need, and diagnose ownership, groups, directory traversal, and ACLs before reaching for a broad value such as 777. As the chmod manual page notes, a mode string only describes requested bits; effective authorization is a separate question. The calculator's job is to keep that mode string honest, not to promise that any string is safe in every environment.