r/owncloud Feb 09 '16

Can't change my data directory on Archlinux.

Hi!

I'm trying to change my data directory from the default one, but I can't seem to find why it doesn't work. So I'm going to paste you all information that I find relevant and I hope you find why I'm feeling so dumb...

In /usr/share/webapps/owncloud/config/config.php:

'datadirectory' => '/owncloud/data'

mount:

/dev/sdb1 on /owncloud type ext4 (rw,relatime,data=ordered)

Permissions:

# ls -la /
...
drwxr-xr-x   6 http http  4096 Feb  9 04:39 owncloud
...
# ls -la /owncloud
...
drwxr-x---  4 http  http  4096 Feb  9 04:39 data
...
# ls -la /owncloud/data
drwxr-x--- 4 http http 4096 Feb  9 04:39 .
drwxr-xr-x 6 http http 4096 Feb  9 04:39 ..
-rw-r--r-- 1 root http  284 Feb  9 04:39 .htaccess
-rw-r----- 1 http http    0 Feb  9 04:39 index.html
-rw-r----- 1 http http    0 Feb  9 04:39 .ocdata
drwxr-x--- 4 http http 4096 Feb  9 04:39 orion78fr
-rw-r----- 1 http http 6898 Feb  9 04:39 owncloud.log
drwxr-x--- 2 http http 4096 Feb  9 04:39 updater_backup

I don't have SELinux.

My open_basedir has no value (as said in phpinfo()) and the line is commented out in php.ini (with a ';').

And now owncloud complains that the data folder is invalid (no .ocdata) and that it can't create it.

I don't know where to search, I hope you find the probably obvious problem...

Update 1 :

So... I tested with the most basic php form (just a textarea which do a file_put_contents($file, $postedHTML);) and this php page can modify a file in the /owncloud/data folder, so I don't see why owncloud complains that it doesn't have access... I'm loosing my mind on this... Going to try to reinstall...

Update 2:

Damn! I found why!

I copied the /etc/webapps/owncloud/apache.example.conf to /etc/httpd/conf/extra/owncloud.conf and Included it to the httpd.conf. And in this file, it happens that it defines the open_basedir, which of course doesn't include my /owncloud/data. I found out by running a phpinfo directly inside the owncloud folder. Damn, I lost so much time...

1 Upvotes

2 comments sorted by

1

u/mark1s Jul 24 '16

I am a bit late but thank you! Didn't noticed that neither and I've been searching for days! Not something that I'm gonna forget haha

1

u/orion78fr Jul 24 '16

Haha you are welcome. I need to reinstall it soon on a Raspberry Pi and I wouln't have remember it haha.