Convert Linux permissions between octal (755), symbolic (rwxr-xr-x) and ls -l output, with setuid, setgid, sticky bit, expressions like u+x,g-w and umask.
Three ways to write the same permission, and what each bit does.
Every file on Linux and macOS carries 12 mode bits: nine permission bits (read 4, write 2 and execute 1, for owner, group and others) and three special ones (setuid 4000, setgid 2000 and sticky 1000). In octal, each digit adds the values of its class, so 755 is 7 (rwx) for the owner and 5 (r-x) for group and others, which ls -l prints as rwxr-xr-x. The special bits take the fourth digit: 4755 is rwsr-xr-x, 2755 is rwxr-sr-x and 1777 is rwxrwxrwt, the mode of /tmp. A lowercase s or t means execute is also on; a capital S or T means the special bit without execute, almost always a mistake. The calculator converts between octal, symbolic and chmod clauses, reads pasted ls -l and stat lines, and applies relative expressions such as u+x,g-w or a+X following POSIX, checked against GNU coreutils 9.4 chmod. A capital X turns on execute only for directories or files that already have some x. The umask is not a subtraction but a bit mask: new files start from 666, directories from 777, and the result is the mode with the umask bits cleared, bit by bit. With 022 you get 644 and 755; with 027, 640 and 750; with 077, 600 and 700. Everything runs in your browser.
How to use
Toggle the permissions or type the mode, then copy the command.
On the Calculator tab, toggle r, w and x for owner, group and others (and setuid, setgid or sticky), or type the octal or symbolic form: the three fields move together. Pick file or directory and copy the ready chmod.
On the Expression tab, enter the current mode and an expression such as u+x,g-w or a=r to see the result and every step. On the ls -l tab, paste terminal output to decode many items at once.
On the umask tab, type the umask to see the mode of new files and directories, or enter the wanted mode to find the umask. The page keeps its state in the address so you can share it.
Embed
Use this tool on your site
Paste the code into your HTML and the tool shows up on your page, without J-Kit's navigation and ads. It still runs in the browser of whoever visits your site.
<iframesrc="https://jkit.tools/embed/en-US/chmod-calculator"width="100%"height="600"style="border:0"loading="lazy"referrerpolicy="no-referrer-when-downgrade"title="chmod and umask Calculator"></iframe><p style="font-size:12px;margin:6px 0 0">Tool by <a href="https://jkit.tools/en/tools/chmod-calculator">J-Kit</a></p>
Cite
Cite or link to this tool
Using it in a paper, class or post? Copy the link or a ready-made reference. The access date is today's.
<a href="https://jkit.tools/en/tools/chmod-calculator">chmod and umask Calculator</a>
References
Sources and references for this tool
These references help contextualize formulas, standards, APIs and limitations used on this page. They do not replace professional validation when a result has legal, financial, medical or operational impact.
The 7 gives the owner read, write and execute (4+2+1). Each 5 gives group and others read and execute (4+1), without write. On files it is the mode of programs and scripts; on directories it lets everyone list and enter, but only the owner create and delete items. ls -l shows rwxr-xr-x.