sudo chown -R $USER:www-data .
sudo find . -type f -exec chmod 664 {} \;
sudo find . -type d -exec chmod 775 {} \;
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
cd /var/www/html/xxxx
sudo chown -R www-data:www-data .
sudo find . -type f -exec chmod 664 {} \;
sudo find . -type d -exec chmod 775 {} \;
sudo chgrp -R www-data $(find -type d -name storage)
sudo chgrp -R www-data $(find -type d -name cache)
sudo chmod -R ug+rwx $(find -type d -name storage)
sudo chmod -R ug+rwx $(find -type d -name cache)