After trying :
find /var/www/html -type d -exec chmod 755 {} \;
to give permissions for folders
find /var/www/html -type f -exec chmod 644 {} \;
to give permissions for files
What did it for me was this command :
sudo chown -R www-data:www-data /var/www/html