ForHosting KIT · Developer Utilities

Convert Unix permissions between symbolic and octal

rwxr-xr-- converts to 754, and 754 converts back to rwxr-xr--, because read counts 4, write 2 and execute 1 for each audience. Paste either form and get both, with malformed values flagged instead of guessed. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Text
rwxr-xr--
You get
Input
rwxr-xr--
Input format
symbolic
Octal
754
Symbolic
rwxr-xr--

Unix permissions are compact, but switching between forms can be surprisingly error-prone when you are reviewing a deployment, writing a chmod command, or documenting a security change. This converter accepts either a nine-character symbolic value such as rwxr-xr-- or a three-digit octal value such as 754, validates every position, and returns both representations. The conversion is deterministic and runs without network access, filesystem access, or interpretation of the permission against a real file. Malformed digits, misplaced letters, extra prefixes, whitespace, and incomplete values produce an explicit input error instead of a plausible but incorrect result.

Understand the two permission representations

A standard Unix permission value describes access for three audiences in a fixed order: the file owner, the owning group, and everyone else. Symbolic notation gives each audience a three-character block. The positions always mean read, write, and execute, so rwx grants all three permissions, r-x grants read and execute, and r-- grants read alone.

Octal notation compresses those same bits into one digit per audience. Read contributes four, write contributes two, and execute contributes one. Adding the enabled values produces a digit from zero through seven.

Therefore rwx becomes 7, r-x becomes 5, and r-- becomes 4, making rwxr-xr-- equivalent to 754. This converter preserves that exact owner-group-other ordering. It does not look up users, groups, access-control lists, or filesystem metadata.

Keeping the operation narrowly focused makes the result predictable and useful in scripts, reviews, runbooks, and educational material where a clear representation change is all that is needed.

Provide a strict symbolic or octal value

Enter exactly one permission string in the text field. For octal input, provide exactly three characters and use digits zero through seven, for example 640 or 755. For symbolic input, provide exactly nine characters, divided conceptually into owner, group, and other triplets.

Each triplet must place r in the read position, w in the write position, and x in the execute position; use a hyphen when that permission is absent. A value such as rw-r----- is valid, while wr-r----- is not, because the letters are in the wrong positions. Validation is intentionally strict.

The converter does not trim spaces, accept a chmod command, accept a leading file-type character from an ls listing, or silently discard a leading zero. It also excludes setuid, setgid, and sticky-bit notation because those special bits require additional symbolic rules. Rejecting unsupported forms prevents accidental normalization and makes malformed input visible immediately, which is safer when permission values are copied into deployment automation.

Use the result safely in operational work

The response identifies whether the submitted value was octal or symbolic and returns normalized fields for both forms. You can show the symbolic field to a reviewer who wants readable access rights, while using the octal field in a command, infrastructure template, or configuration record. Always remember that conversion is not authorization analysis.

A mathematically correct mode can still be inappropriate for a sensitive key, shared directory, executable, or service account. Before applying it, confirm who owns the target, whether directory execute permission is required for traversal, whether default ACLs add access, and whether the application expects special permission bits. This tool never changes a file and never claims that a mode is secure; it only converts a supplied value.

That separation is useful for change-control workflows because teams can validate formatting and compare representations before any privileged command runs.

Review a chmod change

Turn an octal mode into readable owner, group, and other permission blocks before approving a deployment.

Prepare configuration

Convert a reviewed symbolic permission string into the compact three-digit value expected by automation.

Validate documentation

Check that symbolic and octal forms in a runbook describe the same basic Unix permission bits.

Does this tool modify a file?

No. It converts text only and never accesses a filesystem.

Are four-digit modes supported?

No. This version accepts three basic owner, group, and other octal digits, without special bits.

Can I paste output from ls -l?

No. Remove the leading file-type character and provide exactly the nine permission characters.

Why are spaces rejected?

Strict validation prevents hidden formatting from being silently accepted in security-sensitive automation.

Why is a value like wr-r----- rejected?

Each block of three has fixed positions: read first, write second, execute third. In wr-r----- the letters are swapped, so it is not a valid permission. Put each letter in its place and use a hyphen where a right is missing.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/security/file-permission-symbolic-convert

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/security/file-permission-symbolic-convert \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"rwxr-xr--"}'
{
  "text": "rwxr-xr--"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "security.file_permission_symbolic_convert",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Use the result safely in operational work

Automated callers can treat an invalid_input response as a hard stop rather than continuing with guessed permissions or a partially parsed value.

What does the API call cost?

Each API request costs $0.002. The browser version can run locally on the page.

Read the full KIT documentation →