Created
September 15, 2020 02:59
-
-
Save rajeshisnepali/5e228923253296f496f637c9aaa38916 to your computer and use it in GitHub Desktop.
Set webserver permission for laravel project
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
function laravel_set_permission() { | |
sudo find . -type f -exec chmod 644 {} \; | |
sudo find . -type d -exec chmod 755 {} \; | |
laravel_storage_permission | |
} | |
function laravel_storage_permission() { | |
# storage & bootstrap/cache should be writable by server | |
sudo chown -R $USER:www-data storage bootstrap/cache | |
sudo chmod -R ug+rwx storage bootstrap/cache | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment