Please make sure that “/” is writable by the web-server. [Magento 2.4 Sitemap]

If I understand your setup correctly, run the following commands. But make sure:

  1. You’re running them as “god”, not “magento2” user
  2. You’re in /var/www/html/

Set Ownership

sudo chown -R magento2:www-data /var/www/html/

Set Permissions

sudo find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chmod u+x bin/magento

Ref: How to diagnose and fix Ownerships and Permission issues