However when I run occ upgrade I get the following error:
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Turned on maintenance mode
Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed
Maintenance mode is kept active
Resetting log level
I tried to run occ with -vvv parameter but didn’t get any verbose output.
Is there any other way to get more verbose output from occ? Or can someone explain what checks are done that can potentially lead to above mentioned error message?
Yes, I am sure that I’m not using 29 - I first downloaded latest.zip and then realized that my installation is too old for the latest zip
Thanks for the tip with the commandline based updater - this one prints out an error message whereas web updater just said: Check for expected files failed.
Steps that will be executed:
Check for expected files
Check for write permissions
Create backup
Downloading
Verify integrity
Extracting
Enable maintenance mode
Replace entry points
Delete old files
Move new files in place
Done
Start update? [y/N] y
Info: Pressing Ctrl-C will finish the currently running step and then stops the updater.
Check for expected files …PHP Warning: file_put_contents(/serve/owncloud-data/updater-ocsu80ki2op8/.step): Failed to open stream: Permission denied in phar:///serve/xxx/nextcloud/updater/updater.phar/lib/Updater.php on line 1029
[✘] Check for expected files failed
Could not write to .step
Update failed. To resume or retry just execute the updater again.
but I don’t understand why this error happens. It was able to create the directory but then failed to write a file into it?
drwxr-x— 2 apache apache 0 May 17 16:17 updater-ocsu80ki2op8
That is indeed weird. Because just before that, in the code, the directory is created and the file is created (empty) via touch(). That’s succeeding in your case. The failure is only when there is a standard PHP file_put_contents() to place the actual step data inside of it.
What happens when you do something like echo blah > /serve/owncloud-data/updater-ocsu80ki2op8/.step?
However the solution was to disable the setting hidedotfiles=yes in smb.conf on TrueNAS. Once done updater is now working.
No idea why Nextcloud all of a sudden doesn’t like this setting anymore. I’ve checked my update.log file and problems started from version 26 onwards. Before that updates always worked.
Hope this helps if anyone else stumbles across this issue.