Server: Nextcloud 11.0.0 Updater fails -- leaves his root directory (PHP open_basedir restriction active)

Created on 16 Feb 2017  路  8Comments  路  Source: nextcloud/server

Steps to reproduce

  1. Start Nextcloud Updater via Settings Panel
  2. Click Start Update Button

Expected behaviour

dont leave the root directory of nextcloud

Actual behaviour

Tell us what happens instead

The Updater Script leaves the root directory of Nextcloud for update.
Nextcloud ist located in the root of the subdomain without sub-folder.
The root folder for domain AND nextcloud is /var/vhosts/xxxx/subs/oc/

Updater Report:
Initializing
Current version is 11.0.0.
Update to Nextcloud 11.0.1 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-11.0.1.zip
Check for expected files
Check for write permissions
SplFileInfo::isDir(): open_basedir restriction in effect. File(/var/vhosts/xxxx/subs/oc/updater/../..) is not within the allowed path(s): (/var/vhosts/xxxx/subs/oc/:/var/vhosts/xxxx/phptmp/:/dev/urandom:/usr/sbin/sendmail:/proc/meminfo)

Server configuration

Operating system:
Ubuntu 16.04 LTS

Web server:
nginx

Database:
Type: mysql
Version: 5.7.17

PHP version:
7.0.14 (php-fpm)
Nextcloud version: (see Nextcloud admin page)
11.0.0
Updated from an older Nextcloud/ownCloud or fresh install:
fresh
Where did you install Nextcloud from:

0. Needs triage install and update

Most helpful comment

Would be great if it could get fixed, since this often results in errors in shared hosting environments and requires manual intervention.

All 8 comments

Would be great if it could get fixed, since this often results in errors in shared hosting environments and requires manual intervention.

:+1:

@iamhermes thanks for reporting.

From Nextcloud 11.0.2 --> 11.0.3 results in the same error.

SplFileInfo::isDir(): open_basedir restriction in effect. File(/var/www/cloud.foobar.org/www/updater/../..) is not within the allowed path(s): (/var/www/cloud.foobar.org/www/:/var/www/cloud.foobar.org/tmp/:/usr/share/php:/tmp/:/dev/urandom:/var/www/cloud.foobar.org/oc_data/)

This is fixed with the updater that is shipped in 12: nextcloud/updater#105

I will now backport this to the stable branches as well. Beside that you could also fetch the updater.phar and index.php from the github repo that is linked above and place them in the updater/ directory

The problem always occurs in NextCloud 9.

I tried to replace updater/index.php and download the updater.phar file into updater folder, but got the following error after the "download" step:

Verifying integrity
No signature specified for defined update

I have the same issue trying to upgrade from 9.0.50

Update to Nextcloud 10.0.5 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-10.0.5.zip
Retry update
Check for expected files
Check for write permissions
Enable maintenance mode
Create backup
Downloading
Verifying integrity
No signature specified for defined update

Anyone know how to fix?

The issue stil occurs if you update 11.0.0 -> 11.0.4

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dl5rcw picture dl5rcw  路  3Comments

blackcrack picture blackcrack  路  3Comments

williambargent picture williambargent  路  3Comments

Django-BOfH picture Django-BOfH  路  3Comments

ChristophWurst picture ChristophWurst  路  3Comments