A chmod calculator example walks through converting a Unix permission value such as 755 or 4755 into its nine-character symbolic form, such as rwxr-xr-x or rwsr-xr-x, so you can read exactly which bits are set for owner, group, and others along with any setuid, setgid, or sticky bit. The calculator accepts one complete permission snapshot in either direction: octal to symbolic, or symbolic back to octal. It then returns a canonical octal value, a nine-character symbolic string, and a table that breaks owner, group, and others into read, write, and execute. Special bits are reported both numerically in the leading digit and visually in the execute positions as s, S, t, or T. The whole calculation, validation, table render, and clipboard action run inside the current browser tab; nothing about your file, path, or command is uploaded. That makes the tool safe to use on permission snapshots drawn from production servers, container images, or sticky-bit directories you do not want to leave in shell history.

The reason an example matters more than a description is that chmod's two notations hide different information. Octal is compact and unambiguous, but it collapses the setuid, setgid, and sticky bits into a single leading digit that many people ignore. Symbolic notation shows the special bits directly in the execute positions, but it is also where the case distinction between lowercase s and uppercase S gets lost when someone copies the output as plain text. A calculator that preserves both forms lets you verify a value before you apply it, instead of guessing what 4755 will look like after ls -l.

chmod calculator example
Chmod Calculator Example: Setuid, Sticky, and rwx

How Octal Digits Become rwx Letters

Every ordinary chmod digit is a sum of three independent bits. Read contributes 4, write contributes 2, and execute or directory search contributes 1. Adding any combination of those values produces a single digit from 0 through 7. The first of the three ordinary positions describes the owner, the second describes the group, and the third describes everyone else. The complete 12-bit permission space, once you include the three special bits, runs from octal 0000 through 7777, which is 4096 distinct modes in total.

DigitSumLettersMeaning
00+0+0---No ordinary permissions
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

When you see a four-digit mode, the leading digit is not part of the 4-2-1 sum. It combines the three special bits: setuid contributes 4, setgid contributes 2, and sticky contributes 1. So 6755 carries setuid and setgid together, and 7755 would carry all three, although the man page for chmod notes that setuid and setgid on non-executable files are typically cleared by the operating system. A three-digit mode explicitly means no special bits are set, which is why canonical output omits a redundant leading zero.

Worked Example: Converting 4755 to rwsr-xr-x

Take the four-digit mode 4755 as a single worked example, the kind of value that turns up on setuid wrappers, password helpers, and a few legacy installers. Decompose it position by position using the documented formula. The leading 4 maps to the setuid bit. The next 7 maps to owner: 4 plus 2 plus 1 equals read, write, and execute. The next 5 maps to group: 4 plus 1 equals read and execute. The final 5 maps to others: 4 plus 1 equals read and execute. Assemble the letters in the standard owner-group-others order and the result is rwxr-xr-x, but the owner execute position is replaced by s because setuid is also set and the owner execute bit is present. The final symbolic output is rwsr-xr-x. The round-trip back to octal reads those special bits out of the execute positions and rebuilds 4755, which is exactly what the Chmod Calculator verifies.

Common Chmod Calculator Examples to Try

A handful of standard modes appear again and again in documentation, scripts, and Stack Overflow answers. Running each through a chmod calculator is the fastest way to confirm what you think it means and to see how the special bits surface in the symbolic form.

OctalSymbolicTypical use case
644rw-r--r--Default for regular files readable by everyone but writable by the owner
755rwxr-xr-xDefault for executables and directories traversable by everyone
600rw-------Private files such as SSH keys that only the owner should access
700rwx------Private directories such as a user's home or a keys folder
4755rwsr-xr-xSetuid executables that should run with the file owner's identity
1777rwxrwxrwtSticky world-writable directories such as /tmp

Two of those rows contain a special bit. In 4755, the owner execute becomes s because setuid is combined with an existing execute bit. In 1777, the others execute becomes t because the sticky bit is set on a directory where others also have execute. Running each preset through the calculator confirms the case of the special character and the exact octal that the filesystem will store.

Decoding s, S, t, and T in the Output

The execute positions in the symbolic output double as special-bit indicators. When setuid is set and the owner execute bit is also set, the owner execute character is lowercase s. When setuid is set but the owner execute bit is absent, the character is uppercase S. The same rule applies to setgid in the group execute position: lowercase s means both setgid and execute, uppercase S means setgid without execute. Sticky uses t and T in the others execute position, with the same lowercase-versus-upercase rule.

This case distinction is what makes a round-trip possible. A calculator that prints only the ordinary letters loses the special bit information as soon as someone pastes the string into a config file. Preserving the case means the value can be parsed back to the same octal mode without ambiguity. When you see uppercase S or T in the output, it is a useful warning that you have requested a special bit on a non-executable target, which most operating systems will silently clear.

How to Use a Chmod Calculator Step by Step

  1. Pick the conversion direction that matches the input you already have. Choose octal-to-symbolic if you are starting from a value like 755 or 4755, or choose symbolic-to-octal if you are starting from a value like rwxr-xr-x or rwsr-xr-x.
  2. Enter one complete permission snapshot in the strict form the tool expects. Octal input must contain exactly three ASCII digits such as 755, or exactly four ASCII digits such as 4755 when a special bit is set. Symbolic input must contain exactly nine characters covering owner, group, and others in order, with no leading file-type character and no chmod modification expression.
  3. Convert and review the three outputs side by side. The canonical octal value drops a redundant leading zero when no special bit is present. The nine-character symbolic value preserves the case of any s, S, t, or T. The owner-group-others table lists read, write, execute or search, and labels any setuid, setgid, or sticky bit.
  4. Cross-check the result against the target file, the owning user and group, and the principle of least privilege. Confirm that setuid or setgid is appropriate for the program in question, that sticky is needed only on world-writable directories, and that broad presets like 777 are not being used to mask an ownership or traversal problem.
  5. Copy the chmod OCTAL FILE template to the clipboard only after the review above passes, then replace the FILE placeholder with the real path on your system before running the command.

Limits the Calculator Cannot Hide

The calculator reports requested mode bits; it does not run chmod, recurse through directories, follow symbolic links, modify ACLs, compute an umask-adjusted result, or inspect the current permissions of any file. According to the POSIX definition of the mode bits, access still depends on ownership, access control lists, capabilities, mount options, read-only filesystems, and application sandboxing. A process also needs permission to traverse every parent directory above the target, so a mode of 600 on a file inside a directory the process cannot enter will still produce a permission error.

Special bits deserve particular care. Setuid and setgid on executables can alter effective identities, and systems may clear or ignore them under specific ownership or security conditions. Setgid on directories commonly influences the group of new children, and sticky on directories commonly restricts deletion or renaming by users who do not own the entry. The calculator surfaces those requests in the output but cannot promise that the filesystem will retain or honor every bit. Treat the result as a review aid before applying the command, and for a deeper reference on how the bits map to the underlying system, the chmod calculator cheat sheet pairs well with this example.

Related reading: Box Shadow Generator Example: From Sliders to CSS.