Home › Developer & IT › Unix Permissions Calculator
Unix Permissions Calculator
Converts a Unix/Linux file mode between octal (755, 0644, 4755) and symbolic (rwxr-xr-x, -rw-r--r--, u=rwx,g=rx,o=rx) notation and explains the read/write/execute bits for owner, group and others plus the setuid, setgid and sticky bits.
When to use
You need the chmod command for a permission string seen in ls -l, or want to know what an octal mode such as 4755 grants.
Do not use when: You need ACLs (getfacl/setfacl), Windows NTFS permissions, or umask arithmetic (subtract the umask bits from 666/777 manually).
Formula
digit = 4·read + 2·write + 1·execute for owner, group, others; special digit = 4·setuid + 2·setgid + 1·sticky; mode = special·512 + owner·64 + group·8 + others
Follows the POSIX mode bits as documented in the GNU coreutils manual; an uppercase S or T in a symbolic string means the special bit is set without the corresponding execute bit.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
mode | string | yes | Octal mode with 3 or 4 digits (755, 0644, 4755, 0o755), a 9-character symbolic string optionally preceded by a file-type character (rwxr-xr-x, -rw-r--r--, drwxr-sr-x), or chmod assignments (u=rwx,g=rx,o=rx). |
Outputs
| Output | Type | Unit | Description |
|---|---|---|---|
octal | string | Three digits, or four when setuid/setgid/sticky are set (e.g. 4755). | |
symbolic | string | Nine characters as shown by ls -l (s/S and t/T mark the special bits). | |
owner | string | Permissions of the file owner. | |
group | string | Permissions of the owning group. | |
others | string | Permissions of everyone else. | |
setuid | boolean | Executable runs with the owner's user id (octal 4000). | |
setgid | boolean | Executable runs with the group id; new files in a directory inherit its group (octal 2000). | |
sticky | boolean | Only a file's owner may delete or rename it inside the directory (octal 1000). | |
chmod_command | string | Equivalent chmod command with the octal mode. | |
chmod_symbolic | string | Equivalent chmod command using u=, g=, o= assignments. | |
explanation | string | How each octal digit is built from read (4), write (2) and execute (1). |
Example
755: {"mode":"755"} → {"octal":"755","symbolic":"rwxr-xr-x","owner":"read, write, execute","group":"read, execute","others":"read, execute","setuid":false,"chmod_command":"chmod 755 file","chmod_symbolic":"chmod u=rwx,g=rx,o=rx file"}
rw-r--r--: {"mode":"rw-r--r--"} → {"octal":"644","symbolic":"rw-r--r--","owner":"read, write","group":"read","others":"read","sticky":false,"chmod_command":"chmod 644 file"}
GET https://tttkmbb.com/api/v1/calculate/unix-permissions?mode=755
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/unix-permissions(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/unix-permissions · Markdown: https://tttkmbb.com/developer/unix-permissions.md · JSON definition: https://tttkmbb.com/developer/unix-permissions.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="unix-permissions" - OpenAPI operationId:
convert_unix_permissions - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
FAQ
What does the leading digit in 4755 mean?
The fourth (leading) digit holds the special bits: 4 = setuid, 2 = setgid, 1 = sticky. 4755 is rwsr-xr-x: everyone can run the program with the owner's privileges, as with /usr/bin/passwd.
What is the difference between 755 and 0755?
None; the leading 0 is the C/shell octal prefix. 0o755 (JavaScript/Python style) is accepted too.
Why does ls show a capital S or T?
A capital letter means the special bit is set but the execute bit in that position is not (e.g. rw-r-Sr-- = 2644), which is usually a mistake.
Related calculators
- Number Base Converter — Octal ↔ binary arithmetic behind the mode bits.
- Bitwise Operations Calculator — Mode bits are combined with AND/OR masks.