If I am guessing correctly that the root@nexus shell in your image is outside the dockers (=on the host) I wonder why there even is a www-data user ?
Exactly! Thats what i was wondering about as well. I used this guide to create my nextcloud setup a few years ago, but there is nothing that mentions directly something about creating another www-data group.
But there is one thing under the headline “5.3.Creating And Starting Containers” where i change the permissions on my local nextcloud data volume:
chown www-data:www-data data