2

I am trying to fix an OwnCloud sever. I am stuck since a day, and I am starting to despair. Owncloud (set up on arch linux) says:

Data directory ( /data/ocdata) is invalid

Please check that the data directory contains a file ".ocdata" in its root.
Cannot create "data" directory ( /data/ocdata)

This can usually be fixed by giving the webserver write access to the root directory.

So I did the following (out of desperation):

sudo chown -R 777 /data/ocdata

an ls on ocdata gives:

ls /data/ocdata -a -l

total 12
drwxrwxrwx 2 http http 4096 Sep 14 20:33 .
drwxr-xr-x 4 root root 4096 Sep 14 20:18 ..
-rwxrwxrwx 1 http http    2 Sep 14 20:40 .ocdata

The config.php says:

 <?php
 $CONFIG = array (
 'instanceid' => 'ocac7c1e1b0a',
 'passwordsalt' => 'f30d85305490ef50994a3231be3017',
 'trusted_domains' =>
 array (
     0 => '10.10.10.5',
     ),
     'datadirectory' => ' /data/ocdata',
     'dbtype' => 'pgsql',
     'version' => '7.0.2.1',
     'dbname' => 'owncloud',
     'dbhost' => 'localhost',
     'dbtableprefix' => 'oc_',
     'dbuser' => '---',
     'dbpassword' => '---',
     'installed' => true,
     );`

what might be wrong here?

3

Please note the leading space in ' /data/ocdata'. Remove it and you will be ok.

-1

Try this (on my IIS 6.0)

'datadirectory' =>  'C:\Inetpub\wwwroot\owncloud\data'
-2

My Server is Centos 7 with Plesk 12.0.18. These days I had the same problem with OwnCloud.

For OwnCloud using the root-Plesk-user, I added a new Webspace to my Root-Server. It has its homedirectory in /var/www/vhosts/%domain%/httpdocs, which is located on a smaller SSD Drive. Because I have this huge backup-disk within this server, I tried to set the ./data/-folder to this other drive. The new folder was supposed to be /data/cloud/

Therefore I had to do the same things you did here. But It didnt work. I tried everything like apache aliases, symbolic directorys, copying hidden files too, playing around with chmod, chown ... The directory was there and had the right owner and the right permissions.

Please check that the data directory contains a file ".ocdata" in its root

The solution is quite simple: The problem seemed to be the open_basedir Screen within Plesk: https://downfight.de/grafiken/dimi/5a619a19950af98b6b68c237554d71ad.png (original value: {WEBSPACEROOT}{/}{:}{TMP}{/} ) Change it to:

{WEBSPACEROOT}{/}{:}{TMP}{/}:/dev:/data/cloud

(adding /dev too fixes the /dev/urandom-Error for OwnCloud)

Afterwards I had to comit the changes within Plesk and then I edited the config.php again, to change the data-directory and it worked.

  • Well you can downrate this answer, but in my case this had been the single only fix that I succeded with. Can anyone explain why this is not a good answer? – Nibbels Oct 4 '15 at 9:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.