Skip to content

Instantly share code, notes, and snippets.

@adamcrampton
Last active August 14, 2019 00:18
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 adamcrampton/bcd46b6f799b5929c42ecc3841f341bf to your computer and use it in GitHub Desktop.
Save adamcrampton/bcd46b6f799b5929c42ecc3841f341bf to your computer and use it in GitHub Desktop.
Simple bash script for setting ownership and permissions for a Laravel project
echo Enter project directory name
read dirname
echo Setting permissions for $dirname...
sudo chown -R $USER:www-data /var/www/$dirname/storage
sudo chown -R $USER:www-data /var/www/$dirname/bootstrap/cache
chmod -R 775 /var/www/$dirname/storage
chmod -R 775 /var/www/$dirname/bootstrap/cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment