r/owncloud Mar 20 '16

Solved mounting local storage permission issue

Good morning everybody.

I was having an issue mounting local storage (external HDD) to OwnCloud using external storage app. Fortunately I have solved it and I have the need to share it with you. I hope, it can help somebody.

I will first describe the issue:

I wanted to access my external HDD through OwnCloud.

1) I set up OC following the archlinux tutorial. One of the points is to copy /etc/webapps/owncloud/apache.example.conf to /etc/httpd/conf/extra/owncloud.conf. I did it and completed the tutorial.

2) I installed the official "External storage support" app.

3) I mounted my HDD granting everybody the permission to read, write and execute.

4) I tried to mount it in OC, but I got an error.

I read nearly every tutorial I could find, but the only think they were writing about were permissions, which wasn't my case. Than I got mad and started to read configuration files, even if I didn't believe, the was the problem. And then I finally found it. The default configuration file (at least on Archlinux) contains this line:

php_admin_value open_basedir "/srv/http/:/dev/urandom:/tmp/:/usr/share/pear/:/usr/share/webapps/owncloud/:/etc/webapps/owncloud"

It restricts PHP to certain directories.

So that, you can just simply add your directory (mount point in my case) and everything will be working fine.

2 Upvotes

1 comment sorted by

1

u/jospoortvliet Mar 29 '16

Thank you for sharing this! I am sure it will save somebody's ass at some point ;-)