Chmod Calculator

Calculate Unix file permissions visually. Toggle checkboxes or type an octal value.

755
rwxr-xr-x
Owner7
rwx
Group5
r-x
Others5
r-x
chmod 755 filename

What this means

Owner can read, write, execute. Group can read, execute. Others can read, execute.

About this tool

The ToolNinja Chmod Calculator is a free online Linux file permission calculator. Convert between symbolic notation (rwxr-xr-x) and octal values (755, 644, 777) visually by clicking checkboxes โ€” no need to memorize octal values or permission combinations. Use it as a chmod calculator to find the right permission for any file or directory. Calculate chmod 755 for web server directories and executable scripts, chmod 644 for standard files and config files, chmod 600 for private SSH keys and sensitive credentials, or chmod 777 when you need full access (and understand the security implications). The Linux permission calculator shows Owner, Group and Other permissions side by side so you can see exactly what each user class can do. Whether you're working with rwxr-xr-x permissions and need the octal equivalent, or have an octal value and need to understand what symbolic permissions it represents โ€” the chmod converter handles both directions instantly. Also supports special permission bits: setuid, setgid and sticky bit. Runs entirely in your browser โ€” no login, no server calls. Your permission calculations stay completely private.

When to use it

  • โ†’Setting correct permissions for web server files (644 for files, 755 for directories)
  • โ†’Debugging 'Permission denied' errors in Linux and macOS environments
  • โ†’Understanding what an octal permission string actually allows before applying it
  • โ†’Writing deployment scripts that configure file permissions correctly

Tips

  • โ—†Never use 777 (rwxrwxrwx) in production โ€” it gives full access to everyone on the system.
  • โ—†Web server files: 644 (rw-r--r--). Directories: 755 (rwxr-xr-x). Private config files: 600 (rw-------).
  • โ—†The execute bit on a directory controls whether users can enter it (cd into it), not just list its contents.

Frequently asked questions

What does the execute bit mean on a directory vs a file?

On a file, the execute bit (x) allows the file to be run as a program or script. On a directory, it grants 'search' permission โ€” the ability to traverse the directory (cd into it and access files inside by name). Without execute permission on a directory, you cannot cd into it or access any file inside, even if you can list it with read permission.

What is the difference between chmod 644 and chmod 755?

644 (rw-r--r--): owner can read and write, group and others can only read. This is the correct permission for web-served files โ€” the web server can read them, but nothing can execute or modify them. 755 (rwxr-xr-x): owner can do everything, group and others can read and execute. Correct for directories and executable scripts.

What is the setuid/setgid bit and when is it used?

The setuid bit (4 in the leading digit, e.g. 4755) causes an executable to run with the owner's permissions rather than the caller's. The classic example is /usr/bin/passwd โ€” ordinary users can change their passwords because passwd runs as root. setgid (2) does the same for group. These are powerful and should be used sparingly.

Why do I get 'Permission denied' even as a sudo user?

sudo grants root privileges for specific commands, but 'Permission denied' on a file read doesn't always mean permission bits โ€” it can also mean the file's filesystem is mounted noexec or noread, SELinux/AppArmor is blocking access despite permissions, the file is owned by a different user than expected, or there is a permission issue on a parent directory.

Related tools

๐Ÿฅท ToolNinja