# Chmod Calculator > Free in-browser tool that converts Linux file permissions between octal and symbolic form, decodes an ls -l line including setuid, setgid, and sticky letters, checks umask defaults for new files and directories, and copies a safe chmod or find command. Independent tool, not affiliated with any Linux distribution. Updated 2026-10-31. Full page: https://lab.awaara.cn/chmod-calculator/ ## What it does - Permission calculator: tick read, write, and execute for owner, group, and others, toggle setuid, setgid, and sticky, and read the result as an octal number, a symbolic string, and an ls line at once. - Three-way input: tick the boxes, type an octal mode (3 or 4 digits, digits 0 to 7), or type a symbolic string (9 letters, or 10 with a leading file type letter). Invalid input shows an error and keeps the last valid mode, never a fake result. - ls -l decoding: paste a line such as -rw-r--r-- or drwxrwsr-x. The leading file type letter is ignored. Lowercase s and t in execute positions mean the special bit plus execute; capital S and T mean the special bit without execute. - Umask calculator: type a umask such as 022, 027, or 077 and read the default mode for a new file (from 666) and a new directory (from 777). The mask is applied as a bitwise AND NOT, not as subtraction. - Commands and safety checks: copy a numeric chmod command, a symbolic chmod command that sets exactly these bits, and, when recursive is ticked, split find commands that set directories to the chosen mode and files to the same mode with execute cleared. Warnings flag world-writable modes, setuid or setgid combined with group or other write, a directory a class can list but cannot enter, and a mode of 000. - Everything runs locally in the browser. Nothing is sent to a server. ## What chmod modes mean - Each class (owner, group, others) has three bits: read is 4, write is 2, execute is 1. Add the bits for one class to get its digit, and put the three digits together in owner, group, others order. - For a file, read views contents, write changes them, execute runs the program. For a directory, read lists names, write creates, deletes, and renames entries, and execute allows entry to reach files inside. - Common modes: 644 (rw-r--r--) for regular files, 755 (rwxr-xr-x) for directories and scripts, 600 (rw-------) for SSH private keys, 700 (rwx------) for the .ssh directory, 640 (rw-r-----) for a group-readable config, 775 (rwxrwxr-x) for a shared directory, 1777 (rwxrwxrwt) for a shared temp directory. Mode 777 is world-writable and is almost never the right fix. - Special bits: a leading digit of 4 is setuid (run as the owner), 2 is setgid (run as the group, or inherit the group on a directory), 1 is sticky (stop users deleting each other's files in a shared directory). Linux ignores setuid on scripts in most configurations. - Umask examples: 022 gives new files 644 and new directories 755; 027 gives 640 and 750; 077 gives 600 and 700. ## Sources - GNU coreutils, chmod invocation: https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html - GNU coreutils, ls invocation: https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html - OpenSSH, sshd manual page on key file permissions: https://man.openbsd.org/sshd.8 - Linux man-pages, umask: https://man7.org/linux/man-pages/man2/umask.2.html