Posts: 1
Joined: Sat Mar 16, 2019 6:18 pm

OwnCloud and CIFS Mount

Sat Mar 16, 2019 6:46 pm


I have installed ownCloud using this guide:-

I have run through all the instuctions (including generating the 4096 long dhparam file which took a while) ignoring the external USB drive mount instructions because I'm not using a USB drive. I get to the point where I type the Pi IP address into the browser (still on the Pi) and I enter a new username and password.

Then there is a dropdown menu labelled 'Storage & database' which when clicked asks me to enter a data folder. The data folder I'm using is /home/pi/owncloud which is a CIFS mount from a share on a Netgear ReadyNAS NV+

The folder works perfectly fine when using the Raspbian file browser, I can create files and folders, move files and folders, delete files and folders with no problems at all. If I have the share open on my windows PC I can see all the files being moved, deleted etc with only a short delay so I'm confident the share is set ok.

When I click Finish setup the browser thinks about it for a few seconds and then tells me

Error. Can't create or write onto the data directory /home/pi/owncloud

I think this is probably a permissions problem, however I've now reached my (very low) limit in my understanding of file permissions, users and groups and need some help from you fine people.

I have Googled the problem and did find this : ... valid/1255
Missing permissions

You have permission issues that the users which is running your webserver has no access to this folders. If you’re on e.g. Ubuntu/Debian this can be checked by running the following command:

Code: Select all

sudo -u www-data ls -la /path/to/folder
this command should return a list of files / folders instead of a “Permission denied” message.

If the command is failing you need to make sure to setup the correct permission.

... and the output from that command is...

Code: Select all

$ sudo -u www-data ls -la /home/pi/owncloud
total 4
drwxr-xr-x  2 pi pi    0 Mar 16 17:00 .
drwxr-xr-x 19 pi pi 4096 Mar 16 17:45 ..
...but I can't decode the output :(

As an FYI, here is the entry in FSTAB that mounts the share to the folder. Is the dir_mode=xxx argument correct? I'm assuming it is because everything else works.

Code: Select all

//  /home/pi/owncloud       cifs   uid=1000,gid=1000,vers=1.0,rw,dir_mode=0770,username=coolusername,password=intricatepassword      0       0
Thanks in advance for any time you may spend on this,


Return to “Networking and servers”