Looking for some assistance in setting up an NFS share between WDMyCloud (NFS Server) and RaspberryPi (NFS Client).

I have set up the share successfully using the below config but having some difficulty in setting up the correct permissions for OwnCloud to access the files.

WDMyCloud (NFS Server)


# Use nobody user (uid 65534) for nfs guest.  This is restricted from private
# shares by ACLs.

grep 33 /etc/passwd


grep 33 /etc/group


Raspberry Pi (NFS Client)


proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime  0       1
# a swapfile is not a swap partition, no line here
#   use  dphys-swapfile swap[on|off]  for that  /owncloud   nfs nouser,atime,auto,rw,dev,exec,suid 0 0

Mounts successfully

raspberrypi ~ # df -h
Filesystem                  Size  Used Avail Use% Mounted on
/dev/root                    15G  1.8G   13G  13% /
devtmpfs                    237M     0  237M   0% /dev
tmpfs                       242M  8.5M  233M   4% /run
tmpfs                       242M     0  242M   0% /sys/fs/cgroup
/dev/mmcblk0p1               63M   21M   43M  33% /boot  3.6T  151G  3.4T   5% /owncloud

But listing the directory, it shows different user/group:

raspberrypi ~ # ls -lAh /owncloud/
total 172K
drwxr-xr-x 2 nobody pi 4.0K Oct 17 22:01 files_external
-rw-r--r-- 1 nobody pi  284 Oct 17 21:37 .htaccess
-rw-r--r-- 1 nobody pi  145 Oct 17 22:01 htaccesstest.txt
-rw-r--r-- 1 nobody pi    0 Oct 17 22:01 index.html
-rw-r--r-- 1 nobody pi 156K Oct 17 22:01 owncloud.db
-rw-r--r-- 1 nobody pi    0 Oct 17 22:01 owncloud.log

I'm not even carrying out this as the user 'pi' so not sure why this group is being used:

raspberrypi ~ # whoami

I have attempted a restart of the "nfs-kernel-server" service on the server-side alongside an exportfs -a with no luck.

What I'm trying to achieve is for the file/directory ownership to be "www-data" for both user and group.

Any help would be much appreciated.



Just to add, the UUID for www-data on the Raspberry Pi is also 33:

raspberrypi ~ # grep 33 /etc/passwd
raspberrypi ~ # grep 33 /etc/group

The problem is that all the files in the NFS mount need to be owned by the webserver user. Otherwise you will run into problems. The easiest is if you mount it via smbclient as the webserver user and do a symlink of the data directory. By the way. It is recommended to use Nextcloud instead of ownCloud because it contains important security fixes. Nextcloud also has a feature to access smb shares directly. This is very easy.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.