Owncloud 10.0.1 realpath(): open_basedir restriction in effect. File(\/)

Hi,

I have installed owncloud 10.0.10 in a WebHosting Package. Installation works fine, but I can’t log in. In owncloud.log there are hundrets of messages from this type:

realpath(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (…) at /owncloud/lib/private/Files/Storage/Local.php#389"

I don’t understand why owncloud tries to access “/”. I am not able to allow open_basedir that path at my webhosting package…

Any solutions?

Isn’t this a contradiction? :wink:

How did you install ownCloud?

Hey,

i think the “ownCloud.org” category is quite wrong for issues related to an ownCloud installation.

Ok, sorry. I was a bit confused about the categories.

I installed owncloud with the occ command, that works fine. But login with the browser does not work. And I don’t understand why owncloud want to access the root path “/”?

Any ideas?

I wasn’t aware that this is possible.

Without seeing the config.php? From difficult to impossible. My best guess is, that you have done something terribly wrong.

The config is quite simple so I think you can’t do terrible things :wink: Here is my config.php, without the secrets

<?php
$CONFIG = array (
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'www.mydomain.com',
  ),
  'datadirectory' => '/var/www/vhosts/hosting117112.a2f3f.netcup.net/httpdocs/owncloud/data',
  #'datadirectory' => '/httpdocs/owncloud/data',
  'overwrite.cli.url' => 'http://localhost',
  'dbtype' => 'mysql',
  'version' => '10.0.10.4',
  'dbname' => 'mycloud',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'logtimezone' => 'UTC',
  'installed' => true,
);

I think this is clearly WRONG on a hosted system.

Thanks, but without these options its still not working. I tried nextcloud and it worked perfectly without any problems. So for me the problem is solved, I have switched to nextcloud.

I guess, the datadirectory was also wrong, right?

Anyway, this is not a solution, but a way out. Good luck over there.

No, I even did a migration to nextcloud with the exactly same config.php. The same datadirectory works in nextcloud.
I don’t think that my problem was a configuration problem. Because the exactly same config worked in owncloud 9.1.4

Hey,

similar to @alfredb i think the datadirectory is/was probably the reason for your issue. It looks to me that you had a different one configured initially:

From what i know this can’t be changed after the initial installation without additional modifications within the database (like discussed in e.g. OCC - files:scan) and could have messed up your installation.

1 Like