Calculate the file and directory modes produced by a Unix umask.
The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.
Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.
Regular files start from 0666 and directories from 0777; the umask removes permission bits from those baselines. Octal and symbolic forms are converted to the resulting mode while special bits stay separate.
022
File permissions octal: 644 File permissions symbolic: rw-r--r-- Directory permissions octal: 755 Directory permissions symbolic: rwxr-xr-x
Shell profiles, Linux services, and container entrypoints calculate inherited permissions.