cd /path/to/laravel
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
sudo chown -R www-data:www-data /path/to/laravel
sudo find /path/to/laravel -type f -exec chmod 644 {} ;
sudo find /path/to/laravel -type d -exec chmod 755 {} ;