Most likely you are trying to reach the file from the host at the wrong path, or the file lives inside the container/volume and not where you expect.
On ZimaOS, do not fight it with random chown or usermod first. Confirm where config.php actually is.
Try this:
docker ps --format "table {{.Names}}\t{{.Image}}"
Find your Nextcloud container name, then inspect its mounts:
docker inspect <nextcloud-container-name> --format '{{range .Mounts}}{{println .Source "->" .Destination}}{{end}}'
Then either:
Option 1, edit from the host
If you see a mount that maps to Nextcloud web data, check for:
find /DATA/AppData -path "*nextcloud*" -name config.php 2>/dev/null
Option 2, edit from inside the container
This is often the cleaner way:
docker exec -it <nextcloud-container-name> sh
find / -name config.php 2>/dev/null
In most Nextcloud containers the file ends up here:
/var/www/html/config/config.php
Then edit it from inside the container with whatever editor exists, or print it first:
cat /var/www/html/config/config.php
If the issue is just host permission denied, also check who owns the file from the host side before changing anything:
ls -l /full/path/to/config.php
ls -ld /full/path/to /full/path/to/config
What you are probably missing is this:
the file is either inside the container filesystem, or in a Docker-mounted path owned by root, so changing permissions on the wrong host folder will do nothing.
Post the output of these 3 commands and it will be much easier to tell you the exact path:
docker ps --format "table {{.Names}}\t{{.Image}}"
docker inspect <nextcloud-container-name> --format '{{range .Mounts}}{{println .Source "->" .Destination}}{{end}}'
find /DATA/AppData -path "*nextcloud*" -name config.php 2>/dev/null