"Can’t write into config directory" Error when installing on network drive

I have a R710 that runs EXSI that runs Ubuntu 22.04 with docker & Portainer.
(I do understand that it’s a lot of layers of virtualization)

I also have a QNAP NAS with one volume of 14tb.

Currently, this volume is being used by my main PC as file dumpster / backups & connected like a regular network drive

In root path to that volume, I have created a folder “docker” and a subfolder “nextcloud” with 2 more subfolders “config” & “database”

I have mounted that folder in Ubuntu to “/mnt/dockersmb/” (It is now accusable from that Ubuntu server & I can create/edit/delete files)

However, if I attempt to install nextcloud with Portainer & make it use those folders (“config” & “database”) I get an error “Can’t write into config directory”. However, it has already created its files there & started the web server, so how can it not write into config directory?

I’m really new to Linux & specially nextcloud, so I really hope it isn’t a dump question.

I’m unclear on, among other things, specifically where you’ve mapped config and database within your containers.

Can you provide your Compose file?

Also, I assume you’re using the name config a bit vaguely because the contents will really be more than just your NC config…

To answer your “how can it…?” question keep in mind the nextcloud image will already have the app itself in it (and there’s also some overlaying involved but that’s another story). Typically for the NC base docker image the persistent data volume contains the container’s /var/www/html which includes both config and user data.