Chmod Calculator
Convert Linux file permissions between octal (755) and symbolic (rwxr-xr-x) notation with an interactive checkbox grid.
3 digits, or 4 with special bits
s/S = setuid/setgid, t/T = sticky
Paste a whole ls -l line · Regular file
Permissions
| Class | Read (4) | Write (2) | Execute (1) | Octal | Meaning |
|---|---|---|---|---|---|
| Owner user (u) | 7 | read, write, execute | |||
| Group group (g) | 5 | read, execute | |||
| Others everyone else (o) | 5 | read, execute |
Commands
chmod 755 filechmod u=rwx,g=rx,o=rx fileCommon permissions
What is the Chmod Calculator?
Every file and directory on Linux, macOS and other Unix systems has three permission sets: one for the owner (u), one for the file's group (g) and one for everyone else (o). Each set can allow reading (r = 4), writing (w = 2) and executing (x = 1). Adding the values gives one octal digit per class, so rwxr-xr-x is 7-5-5, written as chmod 755.
A fourth, leading digit holds the special bits: setuid (4) makes a program run with its owner's privileges, setgid (2) runs it with the group's privileges or — on a directory — makes new files inherit the directory's group, and the sticky bit (1) on a directory such as /tmp lets users delete only their own files. In symbolic notation they replace the execute position: s or t when execute is also set, capital S or T when it is not.
For directories the letters mean something slightly different: r lets you list the names, w lets you create, rename and delete entries (together with x), and x lets you enter the directory and access files inside it. That is why directories are usually 755 or 750 while regular files are 644 or 640. Switch between File and Directory above to see the plain-English meaning for each class, and watch for the warnings this calculator shows for risky modes such as world-writable files.
Frequently asked questions
- What does chmod 755 mean?
- The owner can read, write and execute (7 = 4+2+1), while the group and everyone else can read and execute but not modify (5 = 4+1). It is the standard mode for directories, shell scripts and programs.
- What is the difference between 644 and 664?
- Both let everyone read the file. With 644 only the owner can write; 664 also lets members of the file's group write, which is useful for files shared by a team or edited by a web server running in the same group.
- Why is chmod 777 a bad idea?
- 777 lets every user and every process on the machine modify the file or, for a directory, delete and replace anything inside it. A compromised service or another user could then inject code. Fix ownership with chown and use 755/644 (or 775/664 with a shared group) instead.
- What do the s, S, t and T letters mean in ls -l output?
- s in the owner or group execute position means setuid or setgid is set together with execute; S means the special bit is set without execute. t in the others position is the sticky bit with execute, T without. A trailing + means the file has an ACL, a dot an SELinux context and @ (on macOS) extended attributes.
- Should I use numeric or symbolic chmod?
- Numeric modes (chmod 640 file) set all bits at once and are easy to read in scripts. Symbolic modes can also change single bits relative to the current mode (chmod g+w, chmod o-rwx, chmod +x), which is handy when you do not want to touch the other permissions.
- Why does chmod -R 644 break my directories?
- Directories need the execute bit to be entered, so applying 644 recursively makes them inaccessible. Use find with -type f and -type d to set files and directories separately, or a symbolic mode with a capital X (u=rwX,g=rX,o=rX), which only adds execute to directories and already-executable files.
Related tools
- JSON FormatterFormat, validate, minify and explore JSON with precise error locations. Your data never leaves the browser.
- JSON to TypeScriptPaste JSON and instantly generate TypeScript interfaces or type aliases with nested types, optional fields and arrays. Free and offline.
- Regex TesterTest and debug JavaScript regular expressions with live match highlighting, capture groups, flags and replace preview.
- UUID / ULID GeneratorGenerate cryptographically random UUID v4, time-ordered UUID v7, ULID and Nano ID identifiers in bulk, and inspect or convert existing IDs — locally in your browser.
- Hash GeneratorGenerate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes or HMACs from text and files and verify checksums — computed locally with Web Crypto.
- JWT DecoderDecode JWT header and payload, check expiry, and verify HS, RS, PS, ES and EdDSA signatures locally with Web Crypto — your token never leaves the browser.