I have setup a nextcloud docker container running fine except it cannot write to external storages.
The main process php-fpm is run as abc. Inside the container, the user is abc where:
<code># id abc
uid=3008(abc) gid=5004(abc) groups=5004(abc),1000(users)
</code>
<code># id abc
uid=3008(abc) gid=5004(abc) groups=5004(abc),1000(users)
</code>
# id abc
uid=3008(abc) gid=5004(abc) groups=5004(abc),1000(users)
and the external storage is a docker mapped read-write volume with the following Unix permissions, no ACL:
<code># ls -lh /mnt/logs
total 24M
drwxrwxr-x+ 2 3000 abc 2 Feb 17 22:54 files_inotify
drwxrwxr-x+ 2 3000 abc 2 May 11 20:54 files_scan
drwxrwxr-x+ 2 3000 abc 42 Jun 14 01:36 nc-pg
drwxrwxr-x+ 2 3000 abc 4 Jun 11 17:06 watcher
</code>
<code># ls -lh /mnt/logs
total 24M
drwxrwxr-x+ 2 3000 abc 2 Feb 17 22:54 files_inotify
drwxrwxr-x+ 2 3000 abc 2 May 11 20:54 files_scan
drwxrwxr-x+ 2 3000 abc 42 Jun 14 01:36 nc-pg
drwxrwxr-x+ 2 3000 abc 4 Jun 11 17:06 watcher
</code>
# ls -lh /mnt/logs
total 24M
drwxrwxr-x+ 2 3000 abc 2 Feb 17 22:54 files_inotify
drwxrwxr-x+ 2 3000 abc 2 May 11 20:54 files_scan
drwxrwxr-x+ 2 3000 abc 42 Jun 14 01:36 nc-pg
drwxrwxr-x+ 2 3000 abc 4 Jun 11 17:06 watcher
Could some mighty expert tell me how to fix it besides changing the owner to abc?
Environment:
- Container image: linuxserver/nextcloud:29.0.2-ls324
- Docker version:
26.1.4, build 5650f9b - Docker runs Alpine Linux 3.19.1 64bit/Linux 6.6.29-production+truenas inside LXC
- Host: TrueNAS SCALE Dragonfish-24.04.1.1