Broke permissions in docker volumes of nextcloudpi

I broker my nextcloudpi instance on docker changing the permissions for volumes in an attempt to sync the ncdata folder to another host to backup it.

running ncp-config within the container gives me:
PHP Fatal error: require_once(): Failed opening required '/data/nextcloud/apps/previewgenerator/composer/autoload.php' (include_path='/data/nextcloud/apps/news/vendor/pear/net_url2:/data/nextcloud/3rdparty/pear/archive_tar:/data/nextcloud/3rdparty/pear/console_getopt:/data/nextcloud/3rdparty/pear/pear-core-minimal/src:/data/nextcloud/3rdparty/pear/pear_exception:/data/nextcloud/apps') in /data/nextcloud/lib/private/legacy/OC_App.php on line 268

and the permissions are:

$ sudo ls -l /var/lib/docker/volumes
total 8
drwxr-x--x 3 root root     3 Jul  3 09:22 714fe915afa11ef8efa1b3f9817cfdc2055e8619d1722315dc5173234faac686
brwxr-x--x 1 root root 0, 64 Jul  2 17:14 backingFsBlockDev
-rwxr-x--x 1 root root 32768 Jul  3 09:22 metadata.db
drwxr-x--x 3 root root     3 Mai 28 20:11 ncdata

and within ncdata they are the same:

$ sudo ls -l /var/lib/docker/volumes/ncdata
total 9
drwxr-x--x 7 root root 8 Jun  3 13:36 _data

How should the permissions look like, so how can I fix this?
What happens when I reinstall docker completely? Will my ncdata folder deleted during reinstall?
(sudo apt reinstall docker-compose?)

Should be owned by www-data

Strange.

I installed docker on a new machine and run the container nextcloudpi.
There I had the permissions and transferred them manually to the broken installation. To be sure I ran “fix permission” within ncp-config.

Seems working again.

@OliverV: In the freshly new started docker container, the directories are also owned by root. Just some directories needed the read flag for “other user”.