Hello, everybody,
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
maybe sudo chown -R "www-data:www-data" /mnt/ncdata/
would help?
Sorry JimmyKater,
that I had forgotten to write, but I had already tried Currently nobody:nogroup are the owners of /ncdata/
it didnât got clear to me where you set your datafolder? is it directly pointing to the mountpoint or to a folder in a level lower?
OK, Iâll get something else out. I have a QNAP NAS on which I have shared the directory I want to have as Nextcloud user data directory via NFS. Unfortunately you canât get such a NFS share in a LXC mounted via /etc/fstab. Here Proxmox offers a detour via so-called âBind Mount Pointsâ (see: https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points and https://pve.proxmox.com/wiki/Unprivileged_LXC_containers). I have now mounted the NFS share on the Proxmox host (via /etc/fstab). And from the LXC I can access directories of the host via these Bind Mount Points. So schematically this is âNASâ <=> âHOSTâ <=> âLXC with Nextcloudâ. Hope that helped a little bit 
I think my problem is well described in the link https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points. That it just can come to authorization problems. Then I will not set up the whole thing in an LXC, but I will set up a VM.