Mounting NFS folder for /var/www/html/config, /var/www/html/custom_apps

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 23.0.2
Operating system and version (eg, Ubuntu 20.04): Debian 10 (buster)
Apache or nginx version (eg, Apache 2.4.25): 2.4.52
PHP version (eg, 7.4): 8.0.16

The issue you are facing:
I want to follow the instructions in GitHub - nextcloud/docker: ⛴ Docker image of Nextcloud and use an NFS mounted drive for /var/www/html/data, /var/www/html/config and /var/www/html/custom_apps.
I can mount /var/www/html/data without any issue.
When I try to mount /var/www/html/config or /var/www/html/custom_apps from an NFS folder nextcloud crashes immediately on initialization with

rsync: [generator] chown "/var/www/html/config" failed: Invalid argument (22)
rsync: [receiver] mkstemp "/var/www/html/config/repeated_for_various_filenames" failed: Permission denied (13)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]
rsync: [generator] chown "/var/www/html/custom_apps" failed: Invalid argument (22)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3]

If I use a named docker volume this works just fine.
Also /var/www/html/data works fine with NFS.
I have chown’ed the NFS folders to www-data:root (33:0)

Is this the first time you’ve seen this error? (Y):

Steps to replicate it:

  1. Run nextcloud instance in docker with an NFS folder for /var/www/html/config or /var/www/html/custom_apps

X-post on docker forums
https://forums.docker.com/t/multiple-nfs-mounts-on-docker-compose/121973/8

This appears to have a solution
https://www.underkube.com/posts/2021-01-28-nextcloud-podman-rootless-systemd-part-iii-nfs-gotchas/
However I am not sure why this hasn’t been fixed already. Should I use this fix or not?