Nextcloud version (eg, 18.0.2): 18.0.4
Operating system and version (eg, Ubuntu 20.04): Diet-Pi (latest version) on Raspberry Pi 4
Hey there,
I have the following issue:
I want to install Nextcloud on my newly installed Diet-Pi. Because of the minimal storage (SD card), I want to set the Data-Directory on my Synology NAS.
So I mount the NFS share in /mnt/dietpi_userdata/nextcloud_data and installed Nextcloud, but here comes the problem: When I mount the NFS it automatically overwrite the permissions I set from www-data:www-data to root:root.
With these permissions, Nextcloud can not wright in the data directory.
I tried some things I found online (eg. use SMB or External Share or use symlink) but all “solutions” I tried don’t work for me.
Is there a good and secure way to get Nextcloud data directory on my NFS share?
Thanks
Nils
EDIT 27.4.2020:
So I am now a bit less confused. I managed to change the owner and permissions of my mount point by changing the squash and the nfs version. But even now I can not install Nextcloud. The installer tells me it can not create or write in my data directory.
I must find a way to use my NAS as data directory because of the amount of storage. When there is another way (other than external storage app) than I am here for ideas.
if you use nfs v3 the user doesn’t matter.
that is to say the owner ship is represented by uid/gid (the number). if there is no user with a matching uid is present the number is displayed.
do you use an empty share on your synology or do you try to mount a folder in e.g. home?
can you create a dummy file with sudo -u www-data touch /mnt/dietpi_userdata/nextcloud_data/dummy.txt ?
Ouch. No wonder people have issues running NC on those.
I bought a used Dell PowerEdge R420 a while back for about what a home grade NAS costs. Dual 6-core CPUs, 96 GB RAM, PERC with 4x 500 GB disks, iDRAC Enterprise… I run VMware ESXi on it to run Nextcloud and a bunch of other stuff.
It is doable for sure : I do it between my Linux docker host and my FreeNAS server. For you not using NFS v4 means you are surely using v3. For that, what what you need more now is to check for UIDs more than Usernames.
So here in my Linux, Nextcloud is running under UID 33. For that, I had to create a user with UID 33 in FreeNAS. I then created a dataset for Nextcloud and made that UID 33 account the owner of everything in that brand new and empty data set.
Then, I mounted is from my Linux from. As root, I changed UID to UID 33. I then tried to create a sub-folder in the mounted share, as well as creating files. Once successful, it showed that everything was in order for Nextcloud to do its job.