Skip to content

Instantly share code, notes, and snippets.

@perchouli
Created December 29, 2018 21:00
Show Gist options
  • Save perchouli/a8cfa5664524d5a31d27393372142f2a to your computer and use it in GitHub Desktop.
Save perchouli/a8cfa5664524d5a31d27393372142f2a to your computer and use it in GitHub Desktop.
File permissions for Laravel
# If Nginx+Laravel displays a blank page
# cd to Laravel root folder
sudo chown -R www-data:www-data .
sudo usermod -aG www-data $USER
sudo find . -type f -iwholename '*.git*' -exec chmod 664 {} \;
sudo find . -type d -iwholename '*.git*' -exec chmod 775 {} \;
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R 775 storage bootstrap/cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment