o linux dá permissão à pasta
sudo chmod -R a+rwx /path/to/folder
debian dá permissões de escrita
sudo chmod -R 757 /var/www
servidor web de permissões adequadas laravel
sudo chmod -R 777 path/to/root
sudo chown -R www-data:www-data /path/to/root
sudo usermod -a -G www-data ubuntu
sudo find /path/to/root -type f -exec chmod 644 {} \;
sudo find /path/to/root -type d -exec chmod 755 {} \;
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
permissões de ficheiros laravel
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache