July 9, 2021 . 1 MIN READ
sudo find foldername -type d -exec chmod 755 {} “;”
sudo find foldername -type f -exec chmod 644 {} “;”
sudo chown -R www-data:www-data /var/www/html/
make sure your user is a member of the www-data group:
sudo usermod -a -G www-data $USER
then give group permissions:
sudo chmod -R 775 /var/www
service apache2 restart