Skip to content

Instantly share code, notes, and snippets.

@zhd4n
Last active June 25, 2019 07:50
Show Gist options
  • Select an option

  • Save zhd4n/faadfa46b6df98f3356a91aa1f628dd2 to your computer and use it in GitHub Desktop.

Select an option

Save zhd4n/faadfa46b6df98f3356a91aa1f628dd2 to your computer and use it in GitHub Desktop.
Securely set file permissions for Laravel
sudo chown -R $USER:www-data /path/to/your/laravel/root/directory
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 {} \;
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