Chmod Calculator
Tick read, write and execute for owner, group and others to get the chmod number and symbolic permissions, or enter an octal value to see what it allows.
Tick read, write and execute for owner, group and others to get the chmod number and symbolic permissions, or enter an octal value to see what it allows.
On Linux and macOS, every file has read, write and execute permissions for three classes: the owner, the group and everyone else. chmod sets them, and it accepts a three-digit number.
Each digit is the sum of read (4), write (2) and execute (1). 7 means all three, 5 means read and execute, 0 means none.
755 rwxr-xr-x scripts and directories 644 rw-r--r-- regular files 600 rw------- private keys
Unix permissions are stored as bits in the file mode. Three classes, owner, group and others, each have read, write and execute bits, which are worth 4, 2 and 1. Adding the values per class gives one octal digit, so rw- is 6 and r-x is 5, and the three digits together form a number such as 640. The meaning differs between files and directories: on a directory, read allows listing names, write allows creating or deleting entries inside it, and execute allows entering it and accessing items by name. A directory without execute is effectively unusable even if readable.
The symbolic form used by ls -l writes the same nine bits as letters, with a hyphen for a cleared bit, so 754 appears as rwxr-xr--. The chmod command also accepts symbolic edits such as u+x or go-w, which change only the named bits instead of replacing everything. A fourth leading octal digit controls setuid, setgid and sticky bits, which this calculator does not model. Permissions are also filtered by the umask on file creation: a umask of 022 turns a requested 666 into 644. Over-permissive modes like 777 are rarely necessary and are considered a security risk.
The owner can read, write and execute. Group and others can read and execute.
Often 644 for files and 755 for directories. Private keys should be 600.
Without it the shell will not run the file directly.
No. This tool covers the standard three-digit permissions.
They produce the same result, since both set owner to read, write and execute and group and others to read and execute. The symbolic form is easier to read, the octal form shorter.
Entering a directory needs the execute bit. Read alone lets you list names, but you cannot open or change into the directory without execute on it and its parent directories.