Andi Andi - 2 months ago 10x
Linux Question

How to use WD My Book Live share as Raspberry PI owncloud server data directory?

I have installed owncloud based on MySQL on a raspberry pi. On my My Book Live NAS I created a new share called owncloud. On my PI I added the following line to /etc/fstab

//nas001.local/Owncloud /mnt/shares/nas001/owncloud cifs username=<user>,password=<pwd> 0 0

The share is accessible on /mnt/shares/nas001/owncloud

When I try to finish the owncloud setup I am getting the error message:

Can't create or write into the data directory /mnt/shares/nas001/owncloud

When I enter the following command I am getting no error message and the content of the directory will be displayed.

sudo -u www-data ls -lisa /mnt/shares/nas001/owncloud

The owncloud share looks like this

drwxr-xr-x 2 root root 0 Feb 14 07:34 owncloud

Tried the following

chown -R www-data:www-data /mnt/shares/nas001/owncloud
chmod -R 0777 /mnt/shares/nas001/owncloud

Nothing changed.

Is there a way to use a My Book Live share as data directory for a Rasperry PI owncloud server?


The problem was the wrong fstab entry. Here the correct one:

//nas001.local/oc /mnt/shares/nas001/owncloud cifs username=<user>,password=<pwd>,uid=33,gid=33,rw,suid,sec=ntlm,file_mode=0770,dir_mode=0770,nounix 0 0