How to Calculate Unix File Permissions (chmod)

Unix file permissions control who can read, write, and execute files. The chmod command uses either numeric notation (like 755) or symbolic notation (like rwxr-xr-x) to set these permissions. Understanding how to calculate and convert between these formats is essential for server administration and file security. This guide shows you how to use fixie.tools chmod calculator to quickly compute permissions — a free tool with instant conversion between numeric, symbolic, and human-readable formats.

Step 1: Open the Chmod Calculator

Navigate to fixie.tools/chmod in your browser. The calculator works entirely in your browser, converting between numeric (644, 755) and symbolic (rw-r--r--, rwxr-xr-x) notation instantly with no server processing.

Step 2: Choose Your Input Format

Decide whether you want to start with numeric notation (like 644 or 755) or symbolic notation (like rwxr-xr-x). If you have a specific chmod command like chmod 755 file.sh, enter the numeric value. If you're looking at file permissions from ls -l output, use the symbolic format. The tool converts between both formats instantly.

Step 3: Set Permissions for Each User Class

Configure permissions for owner, group, and others. For each class, specify read (r/4), write (w/2), and execute (x/1) permissions. Use the checkboxes to toggle permissions visually, or enter numeric values directly. Owner typically gets read+write+execute (7), while group and others might get read+execute only (5), resulting in the common 755 permission.

Step 4: View All Notation Formats

The calculator displays permissions in multiple formats simultaneously: numeric (like 644), symbolic (like rw-r--r--), and a human-readable explanation of what each permission means. This helps you understand that 644 means owner can read and write, while group and others can only read. You'll also see the exact chmod command to use in your terminal.

Step 5: Copy and Apply Permissions

Click Copy to copy the chmod command to your clipboard. Use it in your terminal like chmod 755 script.sh to apply the permissions to your file. Common permissions include 644 for web files (owner writes, everyone reads), 755 for executables and directories (owner writes and executes, everyone reads and executes), and 600 for private files (owner only).

Frequently Asked Questions

What does chmod 755 mean?
755 means the owner has full permissions (read=4, write=2, execute=1, total=7), while group and others have read and execute permissions only (read=4, execute=1, total=5). In symbolic notation this is rwxr-xr-x. This is the standard permission for executable scripts and directories.
What's the difference between 644 and 755?
644 (rw-r--r--) allows the owner to read and write, while everyone else can only read. 755 (rwxr-xr-x) adds execute permission for everyone. Use 644 for regular files like HTML, CSS, images. Use 755 for scripts, programs, and directories that need to be executed or accessed.
What do the three user classes mean?
The three classes are Owner (the user who owns the file), Group (users in the file's group), and Others (everyone else). Each class gets its own set of read, write, and execute permissions. This allows fine-grained control — you can let the owner write a file while others can only read it.
Is the chmod calculator free?
Yes, Fixie's Chmod Calculator is completely free with no signup requirements, no limits, and no ads. All calculations happen instantly in your browser with complete privacy.
When should I use execute permission?
Use execute permission (1 or x) for shell scripts, compiled programs, and directories. Files need execute permission to run as programs. Directories need execute permission to be accessed or entered with cd. Regular data files like HTML, text, or images should not have execute permission for security reasons.

Related Tools