Advertisement

Chmod Calculator

Calculate Unix/Linux file permissions interactively. Convert between numeric (755) and symbolic (rwxr-xr-x) notation.

=
rwxr-xr-x
CategoryRead (r)Write (w)Execute (x)OctalSymbolic
Owner7rwx
Group5r-x
Others5r-x
Command
chmod 755 filename

Common Presets

Advertisement

Related Tools

Advertisement

Frequently Asked Questions

What does chmod mean?
chmod stands for "change mode" and is a Unix/Linux command used to change file and directory access permissions. It controls who can read, write, and execute files. The command accepts permissions in either numeric (octal) or symbolic notation.
What does chmod 755 mean?
chmod 755 sets the file permissions to rwxr-xr-x. The owner gets full permissions (read, write, execute = 7), while the group and others get read and execute permissions (5). This is the standard permission for executable scripts, web server directories, and most program files.
What is the difference between numeric and symbolic notation?
Numeric (octal) notation uses three digits (e.g., 755) where each digit represents permissions for owner, group, and others. Each digit is the sum of read (4), write (2), and execute (1). Symbolic notation uses letters (rwxr-xr-x) showing the actual permissions directly: r=read, w=write, x=execute, -=no permission.
What permission should I use for web files?
For web files, common permissions are: 644 (rw-r--r--) for regular files like HTML, CSS, and images; 755 (rwxr-xr-x) for directories and executable scripts like PHP files; 600 (rw-------) for sensitive configuration files containing passwords or API keys.
What is the difference between owner, group, and others?
Owner is the user who created the file. Group refers to a set of users who share group membership with the file. Others means everyone else on the system. Each category can have independent read, write, and execute permissions, allowing fine-grained access control.
What does the execute permission do for directories?
For directories, the execute permission controls the ability to access the directory contents and traverse into it. Without execute permission on a directory, you cannot cd into it or access any files inside, even if those files have read permissions. This is why directories typically need 755 permissions.

How to Use the Chmod Calculator

The chmod calculator helps you understand and set Unix/Linux file permissions quickly. Whether you are a system administrator, web developer, or DevOps engineer, understanding file permissions is essential for security and proper system configuration.

Step 1: Set permissions using checkboxes. Click the checkboxes for read (r), write (w), and execute (x) for each category: owner, group, and others. The numeric and symbolic representations update instantly as you toggle permissions.

Step 2: Or enter a numeric value. Type a three-digit octal number (like 755 or 644) in the numeric input field. The checkboxes and symbolic representation update automatically to reflect the permission setting.

Step 3: Copy the chmod command. The tool shows the complete chmod command ready to paste into your terminal. Copy the numeric or symbolic notation and use it directly in your shell commands.

Understanding Unix File Permissions

Unix and Linux file permissions are a fundamental security mechanism that controls who can read, write, and execute files. Every file and directory has three sets of permissions: owner (the user who created the file), group (users sharing the file's group), and others (everyone else). Each set independently controls read, write, and execute access.

The numeric (octal) system represents each permission set as a single digit from 0 to 7. Read is valued at 4, write at 2, and execute at 1. The digit is the sum of the granted permissions. For example, read+write+execute = 4+2+1 = 7, read+execute = 4+1 = 5, and read-only = 4. Common permission combinations include 755 for executable files, 644 for regular files, and 600 for private files.

Common Permission Patterns

Web server files (644). Standard web files like HTML, CSS, JavaScript, and images should use 644 permissions. The owner can read and write, while group and others can only read. This prevents other users from modifying your web content while allowing the web server to serve the files.

Web server directories (755). Directories need the execute permission for traversal. The 755 permission allows the owner full access while letting the web server and other users read and traverse directories to serve content.

Private configuration (600). Files containing passwords, API keys, database credentials, or SSH keys should use 600 permissions. Only the owner can read and write these files, preventing any other user on the system from accessing sensitive data.

Shared executables (755). Shell scripts, compiled programs, and CGI scripts need execute permission to run. The 755 permission lets the owner modify the script while allowing all users to run it. For scripts that should not be modified, 555 is more restrictive.

Advertisement