Update problem : open_basedir goes to ../

Hi there.
This is my first post here, so let’s try it :wink: .
As explain on twitter, i can’t update to 11.0.1 because it fails during the verification of write permissions.
Here is the error, from the index.php/settings/admin page : (update launched)

SplFileInfo::isDir(): open_basedir restriction in effect. File(/var/www/clients/client8/web89/web/updater/…/…) is not within the allowed path(s): (/var/www/clients/client8/web89/web:/var/www/clients/client8/web89/tmp:/var/www/[xxxmy-web-sitexx]/web:/srv/www/[xxxmy-web-sitexx]/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/dev/urandom)

And it did the same for an other nextcloud update on this server.

The nextcloud root is /var/www/clients/client8/web89/web/
the user:group is web89:client8 and go to /var/www/clients/client8/web89/ (but ofc, can go to web/)

I use debian 8 and ispconfig. (apache, mysql, …)

(sorry for my english, i’m french :slight_smile: )

Some more informations :
The update went good on an other server, so i must have a problem with my server installation (ispconfig ?)
here is what i can see :

ls -la /var/www/clients/client8/web89/web/updater/…/…
total 232
drwxr-xr-x 9 root root 4096 nov. 4 2014 .
drwxr-xr-x 6 root root 4096 août 30 2014 …
drwxr-xr-x 2 web89 client8 4096 déc. 10 2012 cgi-bin
drwxr-xr-x 2 root root 4096 janv. 16 13:12 log
drwx–x— 2 web89 client8 4096 nov. 4 2014 private
drwxr-xr-x 2 root root 4096 déc. 21 18:44 ssl
drwxrwx— 3 web89 client8 200704 janv. 16 14:09 tmp
drwx–x--x 15 web89 client8 4096 janv. 16 13:17 web
drwx–x— 2 web89 client8 4096 nov. 4 2014 webdav

Nextcloud is in the web folder.

Hi, i did not update to 11.0.1 yet, but here is a screenshot of the PHP config of the (well working) vsite with Nextcloud:

thx for the answer.
I already added the /dev/urandom to this field. But not proc/meminfo (never had to)
I could add the folder needed in this field too, but i really wonder why ?

It’s needed for the “Server info” page. If not set, /proc/meminfo could not be read - watch the “Logging” page.

Ok, thanks you, i’ll do it then. But what about my problem and update to 11.0.1 ? :frowning:
Must I add …/…/ to my opendir too ?
Why is it needed ?

ok, i added the folder /var/www/clients/client8/web89/ in my open_basedir field and it worked.
But i really wonder why this folder must be used by nextcloud. Isn’t it a security problem about all the things that are in this folder ?

I was able to change my variable, but what about a simple user who can’t access this folder in general ?

And moreover, why is it the first time Nextcloud ask me for this ?

Thanks for your help, anyway, now, it works and i can delete this from my open_basedir paramaters.

Same here. When starting the updater I get this error message while checking write permissions:

SplFileInfo::isDir(): open_basedir restriction in effect. File(/home/webpages/lxyz-xyzy/kxyz-xyzt/nextcloud/updater/…/…) is not within the allowed path(s): (/tmp:/home/webpages/tmp:/dev/urandom:/home/webpages/lxyz-xyzy/kxyz-xyzt/nextcloud)

@dabou’s solution will not work for me. Firstly I have no ability to set open_basedir restriction. Secondly my web hoster prohibits the access of the top level directory /home/webpages/lxyz-xyzy/kxyz-xyzt/ from within a subdirectory. In the top level directory various websites can reside side by side and for security reasons it is not allowed that they access each others content.

But what sense does it make that the Nextcloud updater accesses this directory? There is nothing belonging to the Nextcloud installation in it. Everything is in the subdirectory called nextcloud and to this the updater has access. Thus I suppose we stumbled upon a bug in the updater. Or do I go wrong?

Knut

grep -R open_basedir /etc

I do not understand? That is a linux shell command, isn’t it? As I wrote, I have no access to these settings. I’m on a shared hoster which does not even provide ssh. How can I execute a shell command?

And what about the necessity to access a top level directory which does not have any contents related to Nextcloud? Which settings Nextcloud updater is going to change there?

I have the same problem. I am using Ubuntu 14.04 with PHP 7.1
Nextcloud resides in /var/customers/webs/sysu/cloud/, open_basedir is set to "/var/customers/webs/sysu/cloud:/var/customers/tmp/sysu:/usr/share/php:/usr/share/php5:/tmp:/var/customers/tmp/sysu/:/dev/urandom"
It tries to access “/var/customers/webs/sysu/cloud/updater/…/…”, which fails.

When I change the open_basedir to include “/var/customers/webs/sysu/”, the updater works.

The eventually has been solved. Have a look here: Error updating to 11.0.3