I’m an idiot. It was late when I read your post last night. I miss read the image. The folder is fine as it is.
It’s the Permissions which needs changing. Try running the below command as the “superuser” from within any directory:
sudo chmod 775 /var/www/html
Explanation
Your /var/www/html
folder is currently set to 755
. This means that magento
user can create folders/files but not www-data
. When Magento creates new files, they are created as www-data
. Therefore, it doesn’t have the permissions to create the sitemap.xml file. Switching the /var/www/html
folder to 775
grants access to www-data
to create new files.