-3

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?

Andi
  • 487
  • 3
  • 6
  • 22
  • Don't understand the -X.... – Andi Feb 14 '16 at 11:18
  • It is definitely possible, yes. I did the same on my Pi. – Mikkel Bue Tellus Feb 14 '16 at 13:13
  • Did you get it to run with the default directory? How do the permissions for the folder look like after you ran `chmod`? The permissions have to be `lrwxrwxrwx`, not `drwxr-xr-x` – Mikkel Bue Tellus Feb 14 '16 at 13:25
  • With the default directory it is working. After chown and chmod the permissions are drwxr-xr-x! – Andi Feb 14 '16 at 18:09
  • I don't have my computer with me so this is a bit uphill. But doing chmod -R 777 /directory, should give permissions rwxrwxrwx. Disregard the "l" in the beginning of my last post, it should be "d" when it is directory. What does ls -l /mnt/shares/ output? – Mikkel Bue Tellus Feb 14 '16 at 19:05
  • drwxrwxrwx 3 www-data www-data 4096 Feb 14 08:52 nas001 I think the problem is that after mounting the NAS share to the directory /mnt/.../owncloud the ownership changes back to root and the permission will be changed. – Andi Feb 15 '16 at 06:22

1 Answers1

0

The problem was the wrong /etc/fstab entry.

Here is 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
Andi
  • 487
  • 3
  • 6
  • 22