chmod Calculator
Tick read, write and execute for owner, group and others to get the octal mode, the rwx string and the chmod command.
Free · No sign-up · Your inputs stay in your browser
Input
Work out chmod permissions
| Read | Write | Execute | |
|---|---|---|---|
| Owner | |||
| Group | |||
| Others |
Output
755 is rwxr-xr-x
Command
chmod 755 path/to/file
Symbolic
rwxr-xr-x
As ls -l prints it, without the leading file-type character. A capital S or T means the special bit is set without execute.
About this tool
Method, assumptions, practical next steps, and limits.
How the digits add up
Each digit is the sum of read (4), write (2) and execute (1). 755 gives the owner 7 (4+2+1, everything) and the group and others 5 (4+1, read and execute). 644 is the usual mode for files and 755 for directories and scripts.
Laravel storage permissions
The web server user needs to write to storage and bootstrap/cache. The fix is to give that user the group and use 775 for directories and 664 for files, not 777, which lets every account on the machine change your application.
The special bits
Setuid (4000) runs an executable as its owner, setgid (2000) on a directory makes new files inherit its group, and the sticky bit (1000) on a directory such as /tmp stops users deleting each other's files.