Chmod Calculator
Convert Unix permission bits between strict octal and complete rwx notation, including setuid, setgid, and sticky states.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Choose octal-to-symbolic or symbolic-to-octal, then enter one complete permission snapshot in the required strict form.
- 2.Convert and review the canonical octal value, nine-character symbolic value, and owner/group/others permission table.
- 3.Copy the chmod template only after checking the target file, ownership, special bits, and least-privilege requirements.
About Chmod Calculator
Chmod Calculator converts a complete Unix-style permission bit pattern between octal notation and a nine-character symbolic snapshot. Enter exactly three ordinary octal digits such as 755, or enter four digits such as 4755 when special bits are present. In the other direction, enter a complete symbolic value such as rwxr-xr-x or rwsr-xr-x. The calculation, validation, permission table, and clipboard action run entirely in the current browser tab. No file path, permission value, or command is uploaded to Lizely.
The three ordinary octal positions correspond to owner, group, and others. Within each position, read contributes 4, write contributes 2, and execute or directory search contributes 1. Therefore 7 means read, write, and execute; 6 means read and write; 5 means read and execute; and 0 means no ordinary permissions. The tool tests all eight digit values from 0 through 7 rather than relying on a handful of familiar examples.
Octal input is intentionally strict. It must contain exactly three or four ASCII octal digits, with no 0o prefix, sign, space, separator, decimal point, underscore, or Unicode lookalike digits. A three-digit input explicitly means no setuid, setgid, or sticky bit. With four digits, the first digit combines setuid as 4, setgid as 2, and sticky as 1. Thus 6755 carries setuid and setgid, while 7755 carries all three special bits. An explicit leading zero such as 0755 is accepted and represents the same mode bits as 755; canonical output omits that redundant zero when no special bit is set. The complete 12-bit range contains 4,096 distinct modes, numbered from decimal 0 through 4095, which is octal 0000 through 7777. Decimal 4096 is one past the maximum, and the text 4096 is not valid octal because 9 is not an octal digit.
Symbolic input is also strict and complete. It contains nine characters: three for owner, three for group, and three for others. Read positions accept r or a hyphen, write positions accept w or a hyphen, and ordinary execute positions accept x or a hyphen. This is the permission portion commonly shown by listing tools. Do not include a leading file-type character such as the initial dash in -rwxr-xr-x, and do not enter a chmod modification expression such as u+x. Those forms carry different information and are rejected rather than guessed.
Special bits share the three execute positions. When setuid and owner execute are both set, the owner execute character is lowercase s; without owner execute it is uppercase S. Setgid follows the same lowercase or uppercase rule in the group execute position. Sticky uses lowercase t when others execute is present and uppercase T when it is absent. Preserving the case distinction is required for a true mode-bit round-trip. The implementation exhaustively checks all 4,096 values from octal 0000 through 7777 through symbolic conversion and parsing.
The result shows canonical octal, symbolic notation, and a table for owner, group, and others. The table separates read, write, and execute or search, and labels any setuid, setgid, or sticky bit. Copy command writes a simple chmod OCTAL FILE template to the clipboard. FILE is a placeholder; the tool never asks for, resolves, or operates on a real path. Clipboard denial leaves the visible values available for manual copying.
Changing the conversion direction loads an appropriate example and immediately clears the old result, error, and copy status. Editing the input does the same. Failed validation cannot leave an earlier conversion visible. Clipboard completion is generation guarded, so a late asynchronous copy result cannot publish a stale success after the input or mode changes. Raw input has a 32-UTF-16-code-unit budget. The exact boundary remains visible and receives a syntax error; the next unit receives an explicit budget error. No HTML length cap silently truncates input.
This calculator describes mode bits, not effective authorization. POSIX defines the bit positions, but access can still be affected by ownership, access control lists, capabilities, mount options, read-only filesystems, application sandboxing, and other operating-system policy. A process also needs permission to traverse parent directories. Umask affects permissions requested when files are created; it is not an extra digit silently applied by this converter.
Special bits deserve operational care. Setuid and setgid on executable files can alter effective identities, and systems may clear or ignore them under particular ownership or security conditions. Setgid on directories commonly influences the group of new children. Sticky on directories commonly restricts deletion or renaming by users who do not own the entry or directory. The calculator reports requested mode bits but cannot promise that a filesystem will retain or honor every bit.
Use the output as a review aid before applying a command. Prefer the least privilege needed by the actual user and service. Avoid copying broad examples such as 777 simply to bypass an access problem; diagnose ownership, groups, directory traversal, ACLs, and service identity first. The tool does not run chmod, recurse through directories, follow symbolic links, modify ACLs, calculate an umask result, inspect current permissions, or determine whether a requested mode is secure for a particular program.
Methodology & sources
Accept only exactly three or four ASCII octal digits or exactly nine position-valid symbolic characters, after enforcing a 32-code-unit raw-input budget without trimming or truncation. Map owner, group, and others read/write/execute to POSIX masks 0400 through 0001. Map setuid, setgid, and sticky to 04000, 02000, and 01000. Render special execute positions as s/S for owner and group or t/T for others according to whether execute is also set. Canonical octal omits a zero special digit but includes a nonzero one. Tests cover all ordinary digits, authoritative special-bit examples, malformed positions, exact and plus-one budgets, and exhaustive symbolic round-trip for every mode from 0000 through 7777. Editing invalidates old results and clipboard generation prevents stale copy feedback.
Frequently asked questions
- What do 4, 2, and 1 mean in each chmod digit?
- Read contributes 4, write contributes 2, and execute or directory search contributes 1. Add the enabled bits to produce one digit from 0 through 7.
- Why does symbolic output sometimes show s, S, t, or T?
- Lowercase s or t means the relevant special bit and execute bit are both set. Uppercase S or T means the special bit is set while that execute bit is absent.
- Does the first digit in 4755 belong to the owner permissions?
- No. In a four-digit mode, the first digit combines setuid as 4, setgid as 2, and sticky as 1. The remaining digits are owner, group, and others.
- Can this tool change permissions on a local or remote file?
- No. It only converts text in the browser and copies a command template. It never receives a path or invokes chmod.
- Does 777 guarantee access?
- No. ACLs, ownership, parent-directory traversal, mount state, filesystem flags, sandboxing, and other policy can still affect access. Broad permissions may also create security risk.
Related tools
- ASCII TableLook up every standard 7-bit ASCII code with exact decimal, hexadecimal, octal, and binary values.
- Unix Timestamp ConverterConvert Unix timestamps to human dates (UTC, local, ISO 8601) and back β instantly, in your browser.
- JSON FormatterFormat, minify, and validate JSON in your browser β pretty-print or compress with pinpoint error locations.
- Regex TesterTest JavaScript regex live β see every match, capture group, and named group highlighted as you type.
- BOM RemoverRemove exactly one leading U+FEFF from pasted decoded text locally while preserving every internal, trailing, or second leading occurrence.
- Code to Image GeneratorTurn complete code text into a clean light or dark PNG locally, without uploading or executing it.