Chmod Calculator
Tick the permissions you want, or type a mode in octal (755), as an ls -l string (rwxr-xr-x) or as a symbolic change (g+w,o-rx), and the other forms update at once. You get ready-to-copy chmod commands, warnings for risky modes and a umask calculator. It all runs in your browser.
| Who | Read (4) | Write (2) | Execute (1) |
|---|---|---|---|
| Owner (user) | |||
| Group | |||
| Others |
Who is u, g, o or a, then + - or =, then r, w, x, X, s or t, as in chmod. Clauses without a who leave the usual 022 umask bits alone.
Related Tools
[4 suggestions]Number Base Converter
Convert whole numbers between binary, octal, decimal, hex and any base from 2 to 36, with two's complement.
Developer & WebCron Expression Generator and Explainer
Paste a cron expression to read it in plain English, check each field and see the next ten run times.
Developer & WebRegex Tester
Test regular expressions against a string, highlight matches, and inspect capture groups.
Developer & WebText to Binary Translator
Convert text to binary, hex, decimal, or octal and decode it back, using UTF-8 bytes.
Developer & WebAbout the Chmod Calculator
A Unix file mode is a set of bits. Three groups of three, for the owner, the group and everyone else, say whether each may read (4), write (2) or execute (1), so 7 is read, write and execute, 5 is read and execute, and 755 means the owner has full access while everyone else can read and run. A fourth digit in front holds three special bits: setuid (4), which runs a program with its owner's rights, setgid (2), which does the same for the group and makes new files in a directory inherit its group, and the sticky bit (1), which on a shared directory such as /tmp stops users from deleting each other's files. In ls -l these appear as s, S, t and T, where a capital means the bit is set without execute. This calculator converts between all the forms and checks them against each other. The symbolic input follows the GNU chmod rules: who is u, g, o or a; the operator is + to add, - to remove or = to set exactly, and = clears the bits it mentions; permissions are r, w, x, s, t, X (execute only for a directory or a file that is already executable) or u, g, o to copy another class's bits. A clause with no who letters leaves the umask bits alone, and the sticky bit is changed through o or a. The umask section shows the permissions a new file (starting from 666) and directory (starting from 777) get after the mask is removed, so a umask of 022 gives 644 and 755. Permissions control who can use a file on the system, not whether its contents are safe, and a mode that allows everyone to write is rarely what you want.
What does chmod 755 mean?▾
The owner can read, write and execute (7), and the group and everyone else can read and execute (5). It is the usual mode for programs and directories, shown in ls -l as rwxr-xr-x.
What is the difference between chmod 644 and 755?▾
644 gives the owner read and write, and everyone else read only, which suits normal files. 755 adds execute for all three, which programs and directories need so they can be run or entered.
What do the s, S, t and T mean in ls -l?▾
A lowercase s or t means the setuid, setgid or sticky bit is set and the matching execute bit is also set. A capital S or T means the special bit is set but execute is not, which is usually a mistake.
How does umask work?▾
The umask removes permission bits from what a new file or directory would otherwise get. Files start from 666 and directories from 777, so a umask of 022 gives 644 for files and 755 for directories.