Chmod Calculator
Calculate Unix file permissions
Unix Chmod Calculator
Calculate Unix file permissions. Toggle checkboxes or enter a numeric value to see both octal and symbolic representations.
How to use the Chmod Calculator
- •Set permissions using checkboxes for each permission type: Read (r), Write (w), and Execute (x) for each of the three user classes: Owner, Group, and Others.
- •Or enter a numeric mode like
755or644in the numeric input field. The checkboxes update automatically to reflect the permission set. - •Or enter symbolic notation like
rwxr-xr-xand the numeric and checkbox representations update in sync. - •View common presets for quick access to frequently used permission sets like
755(standard directory),644(standard file), and600(private file). - •Copy the chmod command to run in your terminal, formatted as
chmod 755 filename.
What are Unix File Permissions?
Unix-like operating systems (Linux, macOS, BSDs) use a permission system that controls who can read, write, and execute files. Every file and directory has three sets of permissions for three classes of users:
- •Owner (u): The user who owns the file, typically the creator.
- •Group (g): Users who belong to the file's group.
- •Others (o): Everyone else on the system.
Each class can have three permissions:
- •Read (r = 4): View file contents or list directory entries.
- •Write (w = 2): Modify the file or create/delete files within a directory.
- •Execute (x = 1): Run the file as a program or traverse (enter) a directory.
The numeric notation uses octal (base 8) numbers where each digit is the sum of the permission values. For example:
- •
7= r(4) + w(2) + x(1) = rwx (full access) - •
5= r(4) + x(1) = r-x (read and execute) - •
4= r(4) = r-- (read only) - •
0= --- (no access)
So chmod 755 means: owner has rwx (7), group has r-x (5), others have r-x (5). This is the standard permission for directories and executable scripts.
Common permission sets every developer should know:
| Numeric | Symbolic | Usage |
|---------|----------|-------|
| 755 | rwxr-xr-x | Directories, executable scripts |
| 644 | rw-r--r-- | Regular files (HTML, CSS, images) |
| 600 | rw------- | Private files (SSH keys, .env) |
| 700 | rwx------ | Private directories, private scripts |
| 444 | r--r--r-- | Read-only files |
Getting permissions wrong is a common source of errors. A Permission denied error often means the file lacks execute permission for scripts or read permission for configuration files. Conversely, overly permissive settings (like 777) create security vulnerabilities.
Common use cases
- •Web server configuration: Setting correct permissions on web files (
644for files,755for directories) is essential for Apache, Nginx, and other web servers to function securely. - •SSH key management: SSH requires private keys to have
600permissions. If they are more permissive, SSH refuses to use them with a "permissions are too open" error. - •Deployment scripts: Build scripts and deploy pipelines often need to
chmod +xscripts to make them executable on the target server. - •Shared hosting environments: Understanding group permissions helps configure shared directories where multiple users need access to the same files.
FAQ
Q: What does chmod +x do?
A: It adds execute permission for all user classes (owner, group, others) without changing other permissions. It is equivalent to chmod a+x in symbolic notation. This is the most common way to make a script executable.
Q: Why does SSH reject my key with "permissions are too open"?
A: SSH enforces strict permission checks on private keys. If your key file has permissions more permissive than 600 (e.g., 644), SSH assumes it may have been compromised and refuses to use it. Run chmod 600 ~/.ssh/id_rsa to fix this.
Q: What is the sticky bit?
A: The sticky bit (set with chmod +t or a leading 1 as in 1755) on a directory prevents users from deleting files they do not own, even if they have write permission on the directory. The /tmp directory typically has the sticky bit set.
Is my data safe?
Yes. This tool runs entirely in your browser. Your data is never sent to our servers.
How to use the Chmod Calculator
- Set permissions using checkboxes for each permission type: Read (r), Write (w), and Execute (x) for each of the three user classes: Owner, Group, and Others.
- Or enter a numeric mode like
755or644in the numeric input field. The checkboxes update automatically to reflect the permission set. - Or enter symbolic notation like
rwxr-xr-xand the numeric and checkbox representations update in sync. - View common presets for quick access to frequently used permission sets like
755(standard directory),644(standard file), and600(private file). - Copy the chmod command to run in your terminal, formatted as
chmod 755 filename.
What are Unix File Permissions?
Unix-like operating systems (Linux, macOS, BSDs) use a permission system that controls who can read, write, and execute files. Every file and directory has three sets of permissions for three classes of users:
- Owner (u): The user who owns the file, typically the creator.
- Group (g): Users who belong to the file's group.
- Others (o): Everyone else on the system.
Each class can have three permissions:
- Read (r = 4): View file contents or list directory entries.
- Write (w = 2): Modify the file or create/delete files within a directory.
- Execute (x = 1): Run the file as a program or traverse (enter) a directory.
The numeric notation uses octal (base 8) numbers where each digit is the sum of the permission values. For example:
7= r(4) + w(2) + x(1) = rwx (full access)5= r(4) + x(1) = r-x (read and execute)4= r(4) = r-- (read only)0= --- (no access)
So chmod 755 means: owner has rwx (7), group has r-x (5), others have r-x (5). This is the standard permission for directories and executable scripts.
Common permission sets every developer should know:
| Numeric | Symbolic | Usage |
|---------|----------|-------|
| 755 | rwxr-xr-x | Directories, executable scripts |
| 644 | rw-r--r-- | Regular files (HTML, CSS, images) |
| 600 | rw------- | Private files (SSH keys, .env) |
| 700 | rwx------ | Private directories, private scripts |
| 444 | r--r--r-- | Read-only files |
Getting permissions wrong is a common source of errors. A Permission denied error often means the file lacks execute permission for scripts or read permission for configuration files. Conversely, overly permissive settings (like 777) create security vulnerabilities.
Common use cases
- Web server configuration: Setting correct permissions on web files (
644for files,755for directories) is essential for Apache, Nginx, and other web servers to function securely. - SSH key management: SSH requires private keys to have
600permissions. If they are more permissive, SSH refuses to use them with a "permissions are too open" error. - Deployment scripts: Build scripts and deploy pipelines often need to
chmod +xscripts to make them executable on the target server. - Shared hosting environments: Understanding group permissions helps configure shared directories where multiple users need access to the same files.
FAQ
Q: What does chmod +x do?
A: It adds execute permission for all user classes (owner, group, others) without changing other permissions. It is equivalent to chmod a+x in symbolic notation. This is the most common way to make a script executable.
Q: Why does SSH reject my key with "permissions are too open"?
A: SSH enforces strict permission checks on private keys. If your key file has permissions more permissive than 600 (e.g., 644), SSH assumes it may have been compromised and refuses to use it. Run chmod 600 ~/.ssh/id_rsa to fix this.
Q: What is the sticky bit?
A: The sticky bit (set with chmod +t or a leading 1 as in 1755) on a directory prevents users from deleting files they do not own, even if they have write permission on the directory. The /tmp directory typically has the sticky bit set.
Is my data safe?
Yes. This tool runs entirely in your browser. Your data is never sent to our servers.