Confusion and problems regarding update

Hello everyone,

I have a Nextcloud server on Ubuntu 14.04 LTS with PHP 5.6 and Nginx with it’s own domain.

The update checking doesn’t seems to work :

-On the administration page it reports that Nextcloud is up to date - Nextcloud 10.0 (stable) whereas I know that version 10.0.1 is available.

-When I manually check for update this is what I get :
sudo -u www-data php occ upgrade
Nextcloud is already latest version

-When I try to get current Nextcloud version this is what I get:
sudo -u www-data php updater/application.php
ownCloud updater 1.0 - CLI based ownCloud server upgrades
Checking system health.
- file permissions are ok.
Current version is 9.1.0.16
No updates found online.
Done

I’m a bit confused, if I check the updater.log I can find these lines:
[info] Execution of upgrade:detect command started
[info] ownCloud 9.1.0.16 found
[info] Execution of upgrade:detect command stopped. Exit code is 4

There is obviously something wrong somewhere.
I must add that my installation was a clean installation of Nextcloud, not a migration from Owncloud.

Thank you for reading my post,
François

1 Like

The new updater app will be available for future upgrades (I think starting from NC 10.0.1) but not for the current one. The occ-command only carries out the upgrades on the database once the new code is in place. Currently, you have to run a manual upgrade:

  • backup
  • delete everything except data/ and config/ folder
  • download latest release from homepage and extract files
  • fix permissions
  • run sudo -u www-data php occ upgrade

Hello Tflidd,

Thank your for your reply.
Where did you find this information ?
The Server Administration manual states it should be working from version 9 and 10.

Anyway, having the installation reporting that it is up to date whereas it is not is a major security issue IMHO I’m going to open an issue if it is not already done.

See you soon,
François

There are several topics about the new upgrade app on the forum. Not sure about the manual but it is possible that it needs an update (there is already a first discussion: Reccomended way of upgrading. · Issue #44 · nextcloud/documentation · GitHub).

That is an excellent question how and when these messages are triggered. There are different release channels (see server settings in your admin-interface), so each release channel gets updates at a different time, e.g. production is more conservative than stable.

I’m on the stable-release channel and I get the notifications of a new update to 10.0.1 (make sure that your server can establish outgoing connections to carry out these checks). But I added some config-options to test the new updater app ( Test our new work-in-progress upgrader script).

Thank you for these informations.

So there is no “official” statement that

The occ-command only carries out the upgrades on the database once the new code is in place.

If it is broken and that administrators are not being informed, something is wrong somewhere.

Everything is stock on my side and I’m on the stable-release channel too and the dashboard report I’m up to date. My server can establish connections or I don’t get any error in any logs anyway.

Where I think it is a major issue is about security updates is if a security update is released and the update app report the installation is up to date. It means we have to regularly check the website to see if there is an update.
I may sound picky but I really think that’s important for the updater to either work or report it is not working.

Anyway, I’m going to report the issue and manually upgrade my installation.

Thank you again Tflidd.

The occ command never checked on available upgrades. Please feel free to improve the documentation (https://github.com/nextcloud/documentation/issues) or make a feature request that this check is added (https://github.com/nextcloud/server/issues).

The whole update procedure was not very good in the past, that was the reason to write the new updater app which will be fully in place for NC 10.0.1 and later. If such problems still occur in the future, please come back and complain. In the current situation there is not much you can achieve because any changes would be in effect for versions after 10.0.1 where the whole new updater app is in place. Not sure about the update notifications, they should normally be independent from the updater app. The update notification app is enabled? No error in the logs?

Ok I will open an issue for the documentation as it currently states that:

The Updater app performs these operations:

Creates an updater_backup directory under your Nextcloud data directory
Downloads and extracts updated package content into the updater_backup/packageVersion directory
Makes a copy of your current Nextcloud instance, except for your data directory, to updater_backup/currentVersion-randomstring
Moves all directories except data, config and themes from the current instance to updater_backup/tmp
Moves all directories from updater_backup/packageVersion to the current version
Copies your old config.php to the new config/ directory

Maybe I have misunderstand the documentation, but I thought it meant that as it “Downloads and extracts updated package” it should check for this said update package.

The updater app is enable and there is no error in the logs.

For me it is quite clear:
https://docs.nextcloud.com/server/10/admin_manual/configuration_server/occ_command.html#command-line-upgrade-label

These commands are available only after you have downloaded upgraded packages or
tar archives, and before you complete the upgrade.

But it might be confusing at others parts. For such points feedback is really appreciated to reduce confusion or misunderstandings.

You are right, the OCC command page is really clear about the update.
The problem came from this page : https://docs.nextcloud.com/server/10/admin_manual/maintenance/update.html
Which after re-reading is still quite clear but could be a bit more explicit, I confused the updater/application.php with the update app I guess.

Thank your for making it clearer.

Feel free to open an issue on the bugtracker or even better propose changes that would be clear for you.

Hi,

Is the new updater shipped with Nextcloud 10.0.1 able to take care of removing strong permissions before the web update, or we still must do that manually ourselves ?.. and if we must do it ourselves, why it’s not integrated in the new updater ?

Thanks,

I do kepp my main .htaccess too as I wrote in it my 404 and 403 sentences

That’s a new topic. Short answer: you still need to do this manually because the updater script is running with webserver-permissions and strong permissions makes root the owner of the code.

Thank you @tflidd for this clear answer ! :slight_smile:

Then this must be made clear in the Updater start / welcome page. Otherwise it’s very confusing.
And IMHO it’s not very stringent to have an Updater that does not work for a server that’s set up as prescribed by the admin manual.

1 Like

Thanks for this remark. Someone already created a feature request on github on this issue:

1 Like