I am currently setting up a Nextcloud on my Proxmox server in an LXC for testing purposes (for documentation purposes). Since I want the Nextcloud data directory to be on my NAS, but I was advised to set a bind mount point on the host in an LXC (the host has integrated the NFS share of the NAS via /etc/fstab), I now have the following problem (although I’m not sure if it is a problem yet)
If I change to the /mnt/ncdata directory in the LXC as user root, I can create a file via touch testdatei.txt, for example. I can also see this file on the NAS. To prepare the Nextcloud installation you can / should make the web server user as owner of the data directory.
If I type chown -R www-data:www-data /mnt/ncdata/ now, I get the following message:
chown: changing ownership of ‘/mnt/ncdata/’: Operation not permitted