Chmod / File Permission Calculator

Calculate Unix file permissions interactively. Click checkboxes to build numeric (755) and symbolic (rwxr-xr-x) output with common presets and Laravel storage permission reference.

Read (r) Write (w) Execute (x) Value
Owner
Group
Other
⚠ 777 grants full access to everyone. Avoid on production servers - it is a security risk.
Laravel storage permissions
storage/ 775 Writable by web server group
storage/app/public 775 Public uploads directory
bootstrap/cache/ 775 Framework cache directory
.env 640 Owner read/write, group read only
public/ 755 Web root - readable by all

What is a Chmod Calculator?

A chmod calculator converts between Unix file permission formats - the octal numeric notation (e.g., 755), the symbolic notation (e.g., rwxr-xr-x), and the visual checkbox representation - so you can build, read, and understand permission sets without memorising the octal arithmetic. Unix permissions control who can read, write, or execute a file, and getting them wrong on a web server is one of the most common causes of deployment failures. Click the checkboxes, type a number, or paste a symbolic string - all three representations stay in sync.

How Unix file permissions work

Every file and directory has three permission groups: Owner (the user who created the file), Group (a Unix group the owner belongs to), and Other (everyone else). For each group there are three permission bits: Read (r = 4), Write (w = 2), Execute (x = 1). Each digit in the octal notation is the sum of the active bits for that group. 755 breaks down as: Owner = 4+2+1 = 7 (read, write, execute), Group = 4+1 = 5 (read, execute), Other = 4+1 = 5 (read, execute). For directories, the execute bit means "can enter" - you need at least execute permission to cd into a directory.

Frequently Asked Questions

What permissions should a Laravel application use?

The web server user (commonly www-data) needs write access to storage/ and bootstrap/cache/. Standard permissions: chmod -R 755 . for the entire project, then chmod -R 775 storage bootstrap/cache to allow group writes. Ensure the web server and your deploy user share the same group. Your .env file should be 640 (owner read/write, group read-only, others none) so the web server can read it without exposing it to other users. Never use 777 on production.

Why is chmod 777 dangerous?

777 grants read, write, and execute permission to every user on the system - including the web server, any other web application running on the same server, and any process spawned by a compromised script. If a PHP file upload vulnerability or code injection exploit runs on your server, 777 permissions allow it to overwrite any file in your application, including .env, configuration files, and PHP source code. Use the minimum permissions required for each file type.

What does the execute bit mean on a directory?

For files, the execute bit (x) means the file can be run as a program. For directories, the execute bit means "can traverse" - you need at least x on a directory to cd into it or access any file inside it. A directory with r but without x lets you list its contents (ls) but not access any files. A directory with x but without r lets you access files if you know their names, but not list them. Both bits together (5) is the typical minimum for web-accessible directories.

How do I change ownership as well as permissions?

Use chown user:group file to change ownership. For Laravel on Nginx/Caddy, a common setup: chown -R deploy:www-data /var/www/app (deploy user owns files, www-data is the group), then chmod -R 750 /var/www/app with chmod -R 770 storage bootstrap/cache. This means only the owner and web server group can read application code, and neither group can write to it except in designated directories.

Related tools