Chmod Calculator

Convert between chmod numeric and symbolic notation. Visualize Unix file permissions for owner, group, and others with an interactive permission builder.

owner
group
others
Read (r)
Write (w)
Execute (x)
$ chmod 755 filename
-rwxxr-xr-x โ†’ rwxr-xr-x
Numeric (Octal)
755
7/5/5 (owner/group/others)
Symbolic
rwxr-xr-x
-rwxxr-xr-x
Owner
7 (rwx)
read, write, execute
Group
5 (rx)
read, execute
Others
5 (rx)
read, execute
Security Assessment
โœ… Reasonable
Based on world-readable/writable flags

Common Permission Reference

OctalSymbolicCommon Use
644rw-r--r--Regular files (HTML, CSS, images)
755rwxr-xr-xDirectories and executable scripts
600rw-------Private files (SSH keys, passwords)
700rwx------Private directories
775rwxrwxr-xShared group directories
750rwxr-x---Group-accessible directories
640rw-r-----Config files with group read
444r--r--r--Read-only for everyone
400r--------Read-only for owner (certs)
1777rwxrwxrwt/tmp directory (sticky bit)
Planning notes, formulas, and examples

About the Chmod Calculator

File permissions in Unix and Linux systems control who can read, write, and execute files and directories. The chmod command sets these permissions using either numeric (octal) notation like 755 or symbolic notation like rwxr-xr-x. Understanding both formats is essential for system administrators, developers, and anyone working with Linux servers.

Our Chmod Calculator provides an interactive way to build and understand Unix file permissions. Toggle individual read, write, and execute bits for owner, group, and others, and see the corresponding numeric code and symbolic representation. The calculator also explains what each permission combination means in practice and shows the full chmod command you need to run.

Whether you're setting up web server file permissions, configuring deployment scripts, or troubleshooting access denied errors, this calculator eliminates the mental math of converting between octal and symbolic notation. It includes common permission presets (644 for files, 755 for directories, 600 for private files) and warnings about security-sensitive combinations like 777 (world-writable).

When This Page Helps

Stop guessing permission numbers. Visually build the exact chmod command you need and understand what each bit means. It is useful when you are hardening a server, setting up deploy access, or checking whether a file should be executable, readable, or private.

How to Use the Inputs

  1. Toggle read (r), write (w), and execute (x) checkboxes for owner, group, and others.
  2. Or enter a numeric (octal) permission code like 755 directly.
  3. View the equivalent symbolic notation and full chmod command.
  4. Check the security assessment for your chosen permissions.
  5. Use presets for common permission patterns.
  6. Copy the generated chmod command to use in your terminal.
Formula used
Permission Octal = Ownerร—64 + Groupร—8 + Othersร—1 Each digit: Read(4) + Write(2) + Execute(1) Example: rwxr-xr-x = (4+2+1)(4+0+1)(4+0+1) = 755

Example Calculation

Result: 755 (rwxr-xr-x)

Owner has full access (rwx=7), group can read and execute (r-x=5), others can read and execute (r-x=5). This is the standard permission for executable files and directories.

Tips & Best Practices

  • Use 644 for web files and 755 for directories as a safe default.
  • Never use 777 in production โ€” find the minimum permissions needed.
  • Directories need execute (x) permission for users to cd into them.
  • Use chmod -R recursively, but be careful โ€” files and directories often need different permissions.
  • The umask command sets default permissions for new files โ€” understand it to avoid permission issues.
  • Special permissions (setuid, setgid, sticky bit) use a 4th leading digit.

Understanding Unix Permission Model

The Unix permission model divides access control into three categories: the file owner (user), the group, and everyone else (others). Each category independently gets three permission bits: read (r=4), write (w=2), and execute (x=1). This creates a 9-bit permission field typically displayed as three octal digits or nine symbolic characters.

The owner is the user who created the file (changeable with chown). The group is a named collection of users (changeable with chgrp). Others means every user on the system who isn't the owner and isn't in the group. Permissions are checked in order: if you're the owner, owner permissions apply; if you're in the group, group permissions apply; otherwise, others permissions apply.

Common Permission Patterns

644 (rw-r--r--) is the standard for regular files โ€” the owner can edit, everyone else can read. 755 (rwxr-xr-x) is standard for directories and executables โ€” the owner has full access, others can read and execute. 600 (rw-------) is for private files like SSH keys and passwords โ€” only the owner can access them. 700 (rwx------) is for private directories. 666 and 777 should almost never be used as they grant write access to everyone.

Web server files typically need 644 (owner=webserver user), and web directories need 755. Upload directories sometimes need 775 if the web server and deployment user share a group. Configuration files containing passwords should be 600 or 640.

Special Permission Bits

Beyond the basic 9 permission bits, Unix has three special bits. The setuid bit (4xxx) on an executable makes it run with the file owner's privileges โ€” /usr/bin/passwd uses this to allow regular users to change their password in the shadow file. The setgid bit (2xxx) on a directory makes new files inherit the directory's group instead of the creator's primary group โ€” useful for shared project directories. The sticky bit (1xxx) on a directory prevents users from deleting files they don't own โ€” /tmp uses 1777 so all users can create temporary files but can't delete each other's files.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • Owner can read, write, and execute (7). Group members can read and execute (5). Others can read and execute (5). This is the standard permission for directories and executable scripts.