Skip to content

Instantly share code, notes, and snippets.

@rajeshisnepali
Created September 15, 2020 02:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rajeshisnepali/5e228923253296f496f637c9aaa38916 to your computer and use it in GitHub Desktop.
Save rajeshisnepali/5e228923253296f496f637c9aaa38916 to your computer and use it in GitHub Desktop.
Set webserver permission for laravel project
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