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).