Linux & Shell

Chmod calculatorUnderstand every permission bit

Choose rwx checkboxes, an octal value or a nine-character permission string.

Chmod calculator

Permission input

Owner
Group
Others

Permissions and paths stay in this browser; no command is executed.

Result

Choose an input to calculate permissions.

Options

Each input source keeps its own draft. Switching sources does not overwrite other inputs; only the selected source is calculated.

Input changed. Calculate again before exporting.

Use the Chmod calculator to inspect who can read, write or execute before choosing a mode. Owner, group and others each have three independent bits; read adds 4, write 2 and execute 1.

The Chmod calculator separates a complete POSIX target from a Git object mode. A repository entry such as 100755 records an executable file, not every permission present on disk.

Why use the Chmod calculator?

Read the complete target

The Chmod calculator shows four-digit octal permissions beside symbolic permissions. A leading zero explicitly displays that no special bit is selected; 4755 and 0755 therefore remain visibly different.

Three identity groups map nine permission switches to one result.

Interpret repository modes separately

Choose Git to distinguish a normal file, executable, symbolic link, tree or submodule. A 120000 entry describes a link whose blob stores its target, not a chmod permission setting.

Five different Git object types stand apart from a permission grid.

Three choices that affect the result

01

Choose the source you mean

Checkboxes, octal text and symbolic text retain separate drafts. Only the active source drives the result. If a text draft is invalid, choose the checkbox source without losing that draft.

02

Select file or directory

The same x bit means program execution for a file and path search for a directory. This option changes the explanation, not the bits. The sample 755 is illustrative, not a recommendation for every file.

03

Review before replacing

Example and Clear preview all input and settings before applying. Undo restores one previous state. Turn automatic calculation off to inspect edits before calculating and exporting. Automatic mode waits 350 ms; manual calculation also supports Ctrl/Cmd+Enter.

Four ways to inspect a mode

Build chmod permissions

Toggle read, write and execute for each identity. Add setuid, setgid or sticky independently, including combinations without execute.

Convert in both directions

Supply 755 or rwxr-xr-x to obtain the same canonical 0755 target. Special bits replace only their matching execute position with s/S or t/T.

Preview one literal path

The Chmod calculator quotes a path as a literal POSIX sh argument and uses GNU operator numeric syntax. An empty path keeps permission results available but produces no command.

Save the current result

Copy or download the current valid result as JSON. Inactive drafts are omitted, and changed input disables exports until the result is refreshed.

Syntax and system boundaries

Exact input formats
Accept exactly three or four octal digits, or nine permission characters in fixed positions. No surrounding spaces, 0o prefix, file-type prefix, ACL suffix or u+x expressions are accepted.
GNU command semantics
The preview uses chmod '=0755' -- './example.txt'. The equals form is a GNU extension that requests all twelve bits explicitly; ordinary 755 or 0755 may preserve directory setuid/setgid. No command runs here.
Five Git modes
Git mode accepts exactly 040000, 100644, 100755, 120000 or 160000. This tool requires six digits even where Git commands accept shorthand, and never translates these values into POSIX permissions.
Literal, bounded paths
Paths may contain at most 4096 UTF-16 units and no C0/DEL controls. A nonempty invalid path blocks POSIX calculation; an empty path only omits the command. Git ignores hidden POSIX fields.
Mode bits are not effective access
ACLs, ownership, mount options, operating-system rules and parent directories also affect access. There is no recursive chmod, umask calculation, file inspection or remote execution.

Chmod calculator questions

What does chmod 755 mean?

The owner has rwx (7); group and others have r-x (5). The Chmod calculator displays this target as 0755 and rwxr-xr-x. It is common for executable files and traversable directories, but does not suit every file.

How do octal and symbolic permissions differ?

They encode the same bits. Each octal digit adds read=4, write=2 and execute=1; the display string uses letters or dashes. Here symbolic input means a nine-character display, not an operation such as u+x.

Do read, write and execute mean the same thing for directories?

No. Directory read lists names, execute permits search/traversal, and write changes directory entries, usually together with execute. Deleting a file depends on directory permissions and other rules, not simply the file’s write bit.

What do setuid, setgid and sticky add?

Their octal weights are 4000, 2000 and 1000. Supported executables may use the owner or group identity; setgid directories commonly pass on their group. Sticky directories restrict removal to entry owners, directory owners and privileged users.

Is chmod 777 safe?

777 grants every class read, write and execute. This can permit unwanted changes, especially on shared systems. Choose bits for the intended users and operation; the calculator cannot determine whether your server is secure.

Unexpected permission result?

Try the Chmod calculator

Use the Chmod calculator to compare a permission target with its rwx display, then inspect the explanation before saving the current result report.