chmod Calculator

Calculate Unix file permissions visually

What is chmod?

chmod (short for “change mode”) is a core Unix and Linux command used to change the access permissions of files and directories. Every file on a Unix-like system has three sets of permissions controlling access for the file’s owner, its group, and all other users.

Permissions were part of the original Unix design in the 1970s and remain the cornerstone of file security on Linux, macOS, BSD, and every other Unix-like operating system. Understanding chmod matters for system administration, web development, and security.

Permission Types

Each file has three types of access:

  • Read (r = 4): View file contents or list directory contents
  • Write (w = 2): Modify or delete the file, or add/remove files in a directory
  • Execute (x = 1): Run the file as a program, or access files within a directory

These are assigned independently to three categories of users:

  • Owner (u): The user who owns the file
  • Group (g): Users in the file’s group
  • Others (o): Everyone else

Numeric (Octal) Notation

The numeric system uses three digits, one per category. Each digit is the sum of permission values:

PermissionValue
Read (r)4
Write (w)2
Execute (x)1
None (-)0

For example, chmod 755 means:

  • Owner: 7 (4+2+1) = rwx (read, write, execute)
  • Group: 5 (4+0+1) = r-x (read, execute)
  • Others: 5 (4+0+1) = r-x (read, execute)

How to Use This Tool

  1. Click the checkboxes to toggle read, write, and execute for each category
  2. Or enter a numeric value (like 755) to see the visual breakdown
  3. Read the numeric code and symbolic representation
  4. Copy the chmod command

Common Permission Values

NumericSymbolicTypical Use
777rwxrwxrwxFull access for everyone (dangerous)
755rwxr-xr-xExecutable files, directories
750rwxr-x—Group-restricted executables
644rw-r–r–Regular files (web content)
640rw-r—–Group-readable config files
600rw——-Private files (SSH keys, configs)
400r——–Read-only private files

Symbolic Notation

Symbolic notation uses letters and operators:

chmod u+x file        # Add execute for owner
chmod g-w file        # Remove write for group
chmod o=r file        # Set others to read-only
chmod a+r file        # Add read for all (a = all)
chmod u=rwx,g=rx,o=r file  # Set all at once

Best Practices

  • Principle of least privilege: Grant only the permissions that are needed
  • Never use 777: Full access for everyone is a security risk
  • Directories need execute: Without x, users can’t cd into or list a directory
  • Use 600 for sensitive files: SSH keys, database credentials, and config files with secrets
  • Set directory permissions to 755: Allows others to traverse but not modify
  • Check before changing: Use ls -la to view current permissions before modifying
  • Use groups wisely: Instead of opening permissions to “others”, add users to the file’s group

Frequently Asked Questions

What does chmod do?

chmod (change mode) is a Unix/Linux command that changes the access permissions of files and directories. Permissions control who can read, write, or execute a file.

What does 755 mean?

755 means the owner has read, write, and execute permissions (7), the group has read and execute permissions (5), and others have read and execute permissions (5). In symbolic form, this is rwxr-xr-x.

What is the difference between numeric and symbolic chmod?

Numeric (octal) mode uses three digits (e.g., 755) where each digit represents permissions for owner, group, and others. Symbolic mode uses letters (e.g., rwxr-xr-x) where r=read, w=write, x=execute.

What permissions should I use for web files?

Common web permissions are 644 for files (owner read/write, others read-only) and 755 for directories (owner full access, others read and list). Never use 777 in production as it gives everyone full access.

Is my data safe?

Yes. Permissions are calculated entirely in your browser. Nothing is sent to any server.