Docker installation Can't write into config directory!

So I’m trying to deploy nextcloud on my docker host.
I defined 2 volumes, one for DB and one for the nextcloud config that are mapped to a folder on my NAS but I keep getting write error.

In my nas write access is configured, when I go into the console of the docker I can also write a test file into the config folder (touch test) so I’m unsure what the exact issue is

Error page says:

Can’t write into config directory!
This can usually be fixed by giving the webserver write access to the config directory.

This is my docker-compose.yml file:
version: ‘3.2’

services:
nextcloud-db:
image: postgres
container_name: nextcloud-db
restart: always
volumes:
- nextcloud-db:/var/lib/postgresql/data
environment:
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
secrets:
- postgres_db
- postgres_password
- postgres_user

app:
image: nextcloud
restart: always
container_name: nextcloud
ports:
- 8080:80
privileged: true
volumes:
- nextcloud:/var/www/html
environment:
- POSTGRES_HOST=nextcloud-db
- POSTGRES_DB_FILE=/run/secrets/postgres_db
- POSTGRES_USER_FILE=/run/secrets/postgres_user
- POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password
- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password
- NEXTCLOUD_ADMIN_USER_FILE=/run/secrets/nextcloud_admin_user
depends_on:
- nextcloud-db
secrets:
- nextcloud_admin_password
- nextcloud_admin_user
- postgres_db
- postgres_password
- postgres_user

volumes:
nextcloud-db:
name: nextcloud-db
driver_opts:
type: nfs
o: addr=10.10.10.80,nolock,soft,rw
device: :/Nextcloud/db

nextcloud:
name: nextcloud
driver_opts:
type: nfs
o: addr=10.10.10.80,nolock,soft,rw
device: :/Nextcloud/nextcloud

secrets:
nextcloud_admin_password:
file: ./nextcloud_admin_password.txt # put admin password in this file
nextcloud_admin_user:
file: ./nextcloud_admin_user.txt # put admin username in this file
postgres_db:
file: ./postgres_db.txt # put postgresql db name in this file
postgres_password:
file: ./postgres_password.txt # put postgresql password in this file
postgres_user:
file: ./postgres_user.txt # put postgresql username in this file

networks:
default:
external:
name: HomeBridge

Did you do the touch test as the www-data user?

Post ls -l of your config folder, and what file system is on the NAS and how you have it mounted.

root@cfd6d40f6fff:/var/www/html/config# ls -l
total 112
-rwxrwx—+ 1 www-data www-data 0 Nov 23 07:06 CAN_INSTALL
-rwxrwx—+ 1 www-data www-data 60 Nov 23 07:06 apache-pretty-urls.config.php
-rwxrwx—+ 1 www-data www-data 70 Nov 23 07:06 apcu.config.php
-rwxrwx—+ 1 www-data www-data 377 Nov 23 07:06 apps.config.php
-rwxrwx—+ 1 www-data www-data 2110 Nov 23 07:06 autoconfig.php
-rwxrwx—+ 1 1000 users 1077 Nov 24 19:08 config.php
-rwxrwx—+ 1 www-data www-data 72739 Nov 23 07:06 config.sample.php
-rwxrwx—+ 1 www-data www-data 484 Nov 23 07:06 redis.config.php
-rwxrwx—+ 1 www-data www-data 798 Nov 23 07:06 reverse-proxy.config.php
-rwxrwx—+ 1 www-data www-data 1330 Nov 23 07:06 s3.config.php
-rwxrwx—+ 1 www-data www-data 1025 Nov 23 07:06 smtp.config.php
-rwxrwx—+ 1 www-data www-data 1103 Nov 23 07:06 swift.config.php

I changed the ownership and right of config.php after seeing this, so now its:

-rwxrwx—+ 1 www-data www-data 0 Nov 23 07:06 CAN_INSTALL
-rwxrwx—+ 1 www-data www-data 60 Nov 23 07:06 apache-pretty-urls.config.php
-rwxrwx—+ 1 www-data www-data 70 Nov 23 07:06 apcu.config.php
-rwxrwx—+ 1 www-data www-data 377 Nov 23 07:06 apps.config.php
-rwxrwx—+ 1 www-data www-data 2110 Nov 23 07:06 autoconfig.php
-rwxrwx—+ 1 www-data users 1089 Nov 26 09:30 config.php
-rwxrwx—+ 1 www-data www-data 72739 Nov 23 07:06 config.sample.php
-rwxrwx—+ 1 www-data www-data 484 Nov 23 07:06 redis.config.php
-rwxrwx—+ 1 www-data www-data 798 Nov 23 07:06 reverse-proxy.config.php
-rwxrwx—+ 1 www-data www-data 1330 Nov 23 07:06 s3.config.php
-rwxrwx—+ 1 www-data www-data 1025 Nov 23 07:06 smtp.config.php
-rwxrwx—+ 1 www-data www-data 1103 Nov 23 07:06 swift.config.php

after this change I get this error in the webpage:

The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.

In the docker logging I only see a connection request from my browser (IP/browser type etc)

filesystem on my nas is ext4. mounted with nfs and rw rights.
(same setup is used for config mapping of a lot of other dockers)