Skip to main content

    Chmod Calculator

    Calculate Unix/Linux file permissions. Toggle read, write, execute for owner, group, and others.

    No signup. 100% private. Processed in your browser.

    Set file permissions by toggling checkboxes or entering an octal number like 755.

    Octal

    755

    Symbolic

    -rwxr-xr-x

    Command

    chmod 755 filename

    Unix File Permissions: How They Work

    Every file and directory on a Unix/Linux system has three sets of permissions: one for the owner, one for the group, and one for everyone else. Each set controls three actions: read (r), write (w), and execute (x). That's 9 permission bits total, which is why chmod uses 3-digit octal numbers — each digit encodes one set.

    The number system is elegant: read = 4, write = 2, execute = 1. Add them up for each group. So 7 (4+2+1) means full access, 5 (4+1) means read and execute, 6 (4+2) means read and write. chmod 755 gives the owner full access and everyone else read/execute — the most common permission for web directories and scripts.

    Getting permissions wrong causes two kinds of problems: too restrictive (users can't access what they need) or too permissive (security vulnerability). This calculator helps you find the exact permission set for your use case.

    Common Permission Patterns

    OctalSymbolicUse Case
    644-rw-r--r--Standard files (HTML, CSS, images, configs)
    755-rwxr-xr-xDirectories, executable scripts, web root folders
    600-rw-------SSH keys, .env files, private credentials
    700-rwx------Private scripts, .ssh directory
    775-rwxrwxr-xShared group directories, deployment folders
    444-r--r--r--Read-only files, system configs you don't want modified
    777-rwxrwxrwxAVOID — full access for everyone (security risk)

    What this means for you: 99% of the time you need either 644 (files) or 755 (directories/scripts). If you're reaching for 777, stop — there's almost always a better solution involving group permissions or ACLs.

    Permission Mistakes That Cause Real Problems

    SSH key too permissive

    SSH refuses to use keys with permissions other than 600 or 400. "Permissions 0644 for 'id_rsa' are too open" is one of the most common SSH errors. Fix: chmod 600 ~/.ssh/id_rsa

    Web server 403 errors

    Nginx/Apache return 403 Forbidden when they can't read files. Usually the web server user needs read access (644 for files, 755 for directories). Check both the file AND every parent directory in the path.

    Script won't execute

    "Permission denied" when running a script usually means it lacks the execute bit. Fix: chmod +x script.sh (adds execute for everyone) or chmod 755 script.sh (explicit full permission set).

    chmod 777 on production

    Giving everyone write access to web files means any compromised process can modify your site. This is how many web defacement attacks succeed. Use proper group permissions instead of 777.

    Permission Number Quick Reference

    NumberPermissionBinary
    0No access000
    1Execute only001
    2Write only010
    3Write + execute011
    4Read only100
    5Read + execute101
    6Read + write110
    7Read + write + execute111

    Each digit in a chmod number (e.g., 755) maps to one of these values. The first digit is the owner, second is the group, third is everyone else. So 755 = owner gets 7 (rwx), group gets 5 (r-x), others get 5 (r-x).

    Related Tools

    How to use this tool

    1

    Toggle read, write, execute checkboxes for owner, group, and others

    2

    Or enter a 3-digit octal number and click Apply

    3

    Copy the chmod command to use in your terminal

    Common uses

    • Setting correct permissions for web server files
    • Fixing SSH key permission errors
    • Configuring deployment script permissions
    • Understanding and debugging Unix permission issues

    Share this tool

    Frequently Asked Questions