Nextcloud Updater

Dear Community

When i use

cd /home/cholech/www/cloud.chole.ch
php ~/www/cloud.chole.ch/updater/updater.phar --no-interaction
php ~/www/cloud.chole.ch/occ upgrade --no-interaction

in a script i get error below. having same problem with the online updater in the browser. i am with a shared hoster hostpoint.ch.

any ideas?

thanks!

daniel

[cholech@s107:~/bin/sh] $ . nc-update-auto.sh
Nextcloud Updater - version: v26.0.0beta2-9-g64e2e4c dirty

Current version is 27.0.1.

Update to Nextcloud 27.0.2 available. (channel: "stable")
Following file will be downloaded automatically: https://download.nextcloud.com/server/releases/nextcloud-27.0.2.zip
Open changelog ↗

Updater run in non-interactive mode.

Start update

Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.

[✔] Check for expected files
[✔] Check for write permissions
[✔] Create backup
[✔] Downloading
[✔] Verify integrity
[✔] Extracting
[✔] Enable maintenance mode
[✔] Replace entry points
[ ] Delete old files ...PHP Warning:  rmdir(/home/cholech/www/cloud.chole.ch/updater/../lib/private): Directory not empty in phar:///home/cholech/www/cloud.chole.ch/updater/updater.phar/lib/Updater.php on line 887
[✘] Delete old files failed
Could not rmdir: /home/cholech/www/cloud.chole.ch/updater/../lib/private

Update failed. To resume or retry just execute the updater again.
PHP Warning:  require_once(/home/cholech/www/cloud.chole.ch/lib/composer/autoload.php): Failed to open stream: No such file or directory in /home/cholech/www/cloud.chole.ch/lib/base.php on line 614
An unhandled exception has been thrown:
Error: Failed opening required '/home/cholech/www/cloud.chole.ch/lib/composer/autoload.php' (include_path='.:/usr/local/share/pear') in /home/cholech/www/cloud.chole.ch/lib/base.php:614
Stack trace:
#0 /home/cholech/www/cloud.chole.ch/lib/base.php(1180): OC::init()
#1 /home/cholech/www/cloud.chole.ch/console.php(48): require_once('/home/cholech/w...')
#2 /home/cholech/www/cloud.chole.ch/occ(11): require_once('/home/cholech/w...')
[cholech@s107:~/www/cloud.chole.ch] 127 $ cd ..

The directory /home/cholech/www/cloud.chole.ch/lib/private is not empty. Maybe the rights are not correct and your user can not delete the files first.

Maybe you can post the folders and files in the directory. If you have got a backup you can remove the directory manually and re-run the updater. If not make a backup of the directory or move it to another place. Recreate an emty directory. Then re-run the updater.

Maybe there is a second problem.

thanks devnull
yeah, seems to be a delet/creation problem
now i get

[ ] Delete old files ...PHP Warning:  rmdir(/home/cholech/www/cloud.chole.ch/updater/../lib/l10n): Directory not empty in phar:///home/cholech/www/cloud.chole.ch/updater/updater.phar/lib/Updater.php on line 887

e[2K[✘] Delete old files failed
Could not rmdir: /home/cholech/www/cloud.chole.ch/updater/../lib/l10n

now it’s not the /private folder you mentioned but the /lib/l10n folder wich is in the same root. reminds me of the problem in the online-updater. always had to create a “core” folder and place a json file in there so that it can be found by the updater. also have to “retry” 100 times online that the update goes through. hum. i think i can’t get more access rights from my hoster…

That’s weird. Just to eliminate the obvious can you try running the updater as follows:

php --define apc.enable_cli=1 ~/www/cloud.chole.ch/updater/updater.phar

Ref: Upgrade via built-in updater — Nextcloud latest Administration Manual latest documentation