Skip to content

Instantly share code, notes, and snippets.

@wouldhide
Created March 12, 2019 09:36
Show Gist options
  • Save wouldhide/5c9be5090129d2f2f38130c6a1cd3aa4 to your computer and use it in GitHub Desktop.
Save wouldhide/5c9be5090129d2f2f38130c6a1cd3aa4 to your computer and use it in GitHub Desktop.
# My user as owner
sudo chown -R my-user:www-data /path/to/your/laravel/root/directory
# Then both your user and the webserver permissions
sudo find /path/to/your/laravel/root/directory -type f -exec chmod 664 {} \;
sudo find /path/to/your/laravel/root/directory -type d -exec chmod 775 {} \;
# Rights for the web server to read and write to storage and cache. Run it in you laravel project root
sudo chgrp -R 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