Chmod Calculator

Interactive Linux file permission calculator. Toggle checkboxes to set permissions, or enter an octal value. Get the chmod command instantly.

Octal

755

Symbolic

-rwxr-xr-x

Command

chmod 755 filename

Permission Matrix

RoleRead (r)(4)Write (w)(2)Execute (x)(1)OctalSymbolic
Owner (u)7rwx
Group (g)5r-x
Others (o)5r-x

Enter Octal Value

Common Permissions

Understanding Linux File Permissions

Octal Notation

Three digits representing owner, group, and others. Each digit is the sum of: read (4) + write (2) + execute (1). Example: 7 = 4+2+1 = rwx.

Symbolic Notation

Ten characters: file type + 3×3 permission triplets (rwx). A dash (-) means the permission is not set. Example: -rwxr-xr-x = 755.

Security Best Practices

Use 600 for private files (SSH keys). Use 755 for directories and executables. Avoid 777 in production. Use the principle of least privilege.

Frequently Asked Questions

What is chmod?

chmod (change mode) is a Linux/Unix command that sets file and directory permissions. It controls who can read, write, and execute files. Permissions are set separately for the owner, group, and others.

What does chmod 755 mean?

chmod 755 means the owner has full permissions (read+write+execute = 7), while group and others have read+execute (5). This is the standard permission for directories and executable scripts.

What is the difference between octal and symbolic notation?

Octal notation uses three digits (e.g., 755), where each digit is the sum of read (4), write (2), and execute (1). Symbolic notation uses letters: r (read), w (write), x (execute), with - for unset. Example: 755 = -rwxr-xr-x.

What should chmod be for SSH keys?

SSH private keys should be 600 (owner read+write only) or 400 (owner read only). The SSH directory (~/.ssh) should be 700. Public keys can be 644. SSH will refuse to use keys with incorrect permissions.

Why is chmod 777 dangerous?

chmod 777 gives full read, write, and execute permissions to everyone. This means any user on the system can modify or delete the file. In web servers, it can allow attackers to inject malicious code. Always use the minimum permissions needed.

How do I use the chmod command?

Use `chmod [permissions] [filename]`. For octal: `chmod 755 script.sh`. For symbolic: `chmod u+x script.sh` (add execute for owner). Use -R flag for recursive: `chmod -R 755 directory/`.