Created
April 27, 2018 01:37
-
-
Save allysonsilva/89cdcc312a989f2261d236ae1a1dd0dc to your computer and use it in GitHub Desktop.
⚡️ Laravel Permissions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Optional: if you've been playing around with permissions consider resetting all files and directories to the default. | |
sudo find ./ -type d -exec chmod 755 {} \; | |
sudo find ./ -type f -exec chmod 644 {} \; | |
## Give users part of the laravel group the standard RW and RWX permissions for the existing files and folders respectively. | |
sudo find ./storage -type d -exec chmod 775 {} \; | |
sudo find ./bootstrap/cache -type d -exec chmod 775 {} \; | |
sudo find ./storage -type f -exec chmod 664 {} \; | |
sudo find ./bootstrap/cache -type f -exec chmod 664 {} \; | |
## Give the newly created files/directories the group of the parent directory e.g. the laravel group. | |
sudo find ./bootstrap/cache -type d -exec chmod g+s {} \; | |
sudo find ./storage -type d -exec chmod g+s {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment