It appears that /var/www may have the user root as the owner, and so you can't modify it. Run this to reset the permissions
Copy to Clipboard
sudo chown www-data:www-data /var/www
sudo chown www-data:www-data /var/www/*
You may also have to add the user dietpi (or another user you are using) to the www-data group so you can modify these files. You may need to reboot for this to take effect. Copy to Clipboard
sudo gpasswd -a theusername www-data
You may need to make the /var/www folder writable by other users in the group: Copy to Clipboard
sudo chmod 755 /var/www
|