Unix Permissions (chmod) Calculator

What does chmod 755 mean?

How it is calculated

Enter a mode of 3 or 4 octal digits (each 0 to 7). Each of the last three digits is one class, in order: owner, group, others. A digit is the sum of 4 = read (r), 2 = write (w) and 1 = execute (x), so 7 = rwx, 6 = rw-, 5 = r-x, 4 = r--, 0 = ---. The tool prints the nine-character string as ls -l shows it, plus each class with its digit.

A fourth, leading digit holds special bits: 4 = setuid (owner's x becomes s, or S if x is off), 2 = setgid (group's x becomes s or S), 1 = sticky (others' x becomes t or T). A leading 0, as in 0644, means none. Any input that is not 3 or 4 octal digits, such as 899 or 75, produces an 'invalid' message instead of a result.

Worked example

Mode 754. Owner digit 7 = 4 + 2 + 1, so rwx (7). Group digit 5 = 4 + 1, so r-x (5). Others digit 4 = read only, so r-- (4). Together the symbolic form is rwxr-xr--. The owner can read, write and run the file, the group can read and run it, and everyone else can only read it. A common use is a script that only its team should run.

Try this example →

Common mistakes

  • Entering a decimal or a digit 8 or 9, as in 899; only 0 to 7 are valid octal digits and the tool reports an invalid mode.
  • Assuming 777 is a safe fix for a 'permission denied' error. It grants write and execute to every user on the system.
  • Reading the digits in the wrong order. They go owner, group, others, not the reverse.
  • Forgetting that a directory needs the x bit to be entered, so 644 on a directory usually makes it unusable even though it is fine for a file.
  • Dropping the leading digit of a 4-digit mode. 4755 is not the same as 755: the s in the owner's position marks setuid.

About this calculator

This tool translates a Unix/Linux file permission mode — written as a 3-digit octal number like 755, or a 4-digit one like 4755 whose leading digit carries the setuid, setgid and sticky bits — into its readable rwx (read, write, execute) form, showing exactly what the owner, group, and everyone else (others) are allowed to do with the file, since each octal digit encodes a combination of those three permission bits.

System administrators, developers deploying a web server, and anyone running chmod on a Linux or macOS terminal use this to avoid guessing what a permission number actually grants — setting a file to 777 makes it writable and executable by literally anyone on the system, which is rarely what you want, while 644 is the safe default for a regular file and 755 for a script or directory. It's a quick way to translate between the octal shorthand used in commands and the rwxrwxrwx notation shown by ls -l.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    The tool only translates a mode you already have. It cannot tell you which mode is right, because that depends on who needs access. As a rule of thumb, ask who really needs write and execute, and give only that. A last digit of 2, 3, 6 or 7 lets every user on the machine write to the file. Setuid on a shell script is worth avoiding. What permission puzzle are you trying to untangle, a web upload folder or a deploy script?

Popular calculators

All Calculators