Unix Permissions Converter
Turn rwx strings into octal, decimal, and owner/group/other.
What it does
Unix files carry nine permission bits in three triads. Owner, group, and other each combine read 4, write 2, and execute 1. The classic rwxr-xr-x sums to 7-5-5, or octal 755.
The tool above takes a nine character symbolic string and returns octal, decimal, and digits. The default rwxr-xr-x matches the worked example, so the page opens showing 755. Type new symbols to update all three results.
Each triad sums: rwx is 7, r-x is 5, r-- is 4, --- is 0. Octal concatenates the three sums. Decimal parses octal base 8: 755 is 7x64+5x8+5 for 493. UGO prints the three sums with dashes.
Use octal for chmod, decimal for APIs that want base 10, and symbols for ls output. Setuid, setgid, and sticky bits need a leading fourth digit outside this nine char form.
This page shows the mapping, one full hand checked example at rwxr-xr-x, a reference table, and practice checks that run through the tool.
How to use
- Type nine chars with r, w, x, or -.
- Keep order owner, group, other triads.
- Read Octal for chmod.
- Read Decimal for APIs.
- Read digits for owner-group-other.
- Add special bits separately; not here.
Formula
- rwx
- 4+2+1 per present letter.
- octal
- Three base 8 digits.
- ugo
- Owner, group, other values.
Exactly nine chars here. Special leading digit for setuid/setgid/sticky is outside.
Worked example
Example: rwxr-xr-x
Convert the common 755 symbolic form.
- Split: rwx | r-x | r-x.
- Owner: 4+2+1 = 7.
- Group: 4+0+1 = 5. Other same 5.
- Octal 755.
- Decimal: 7x64+5x8+5 = 493.
- UGO 7-5-5.
Reference table
| Symbolic | Octal | Decimal |
|---|---|---|
| rwxr-xr-x | 755 | 493 |
| rw-r--r-- | 644 | 420 |
| rwx------ | 700 | 448 |
Limits
- Nine chars only. No leading special digit here.
- Lowercase rwx and dashes only.
- No ACLs or contexts here.
- Numbers to symbols direction not here.
Common mistakes
- Typing 9 chars out of order.
- Using uppercase RWX.
- Reading octal 755 as decimal 755.
- Forgetting dashes count as zeros.
- Expecting setuid in nine chars.
Try it yourself
Quick checks. Answers sit tucked under each question.
rw-r--r--?
Octal 644, decimal 420, ugo 6-4-4.
rwx------?
Octal 700, decimal 448, ugo 7-0-0.
Questions
rwxr-xr-x?
755 (493 decimal).
rwx value?
7.
Decimal?
Octal parsed base 8.
Special bits?
Need leading fourth digit, not here.
Reverse?
Not here. Octal to symbols needs other direction.
Length?
Exactly nine chars.