Can not complete Nextcloud 20.0.9 Update because old files can not be deleted

I’m currently in the process of updating Nextcloud from 20.0.8 to 20.0.9 via web-installer and i’m stuck on the “Delete old files” step:

My dir looks like this:
image

So how do i complete this? I don’t see any easy way to execute OCC

Come on guys, nobody can tell me where the old files are located so that i can delete them?

Hello @Endogen ,

you started a topic in support category.
Unfortunately you ignored the template and a lot of information to help you is missing.

Please add all necessary information like Nextcloud version, webserver type and version, os version, related log file content.

Without additional information the community members cannot help you.

btw. why not using command line when you are able to show us shell based file listing?

https://docs.nextcloud.com/server/latest/admin_manual/maintenance/update.html?highlight=upgrade#using-the-command-line-based-updater

It’s much more comfortable to use the GUI and i started the update process in the GUI and ran into this issue so i think i can’t just switch to command line for the rest.

The additional info you wanted:

  • Nextcloud version is in the title
  • Apache 2.4.18
  • Ubuntu 16.04.7 LTS
  • Logs: not sure where i would get them from

You can.

Regarding web server logs search the web.

For Nextcloud I will point you to the docs:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/logging_configuration.html#file

nextcloud.log doesn’t show anything of interest. last entries show info like this:

{"reqId":"IA9LpLU92gLiGtjG09Fu","level":0,"time":"2021-05-14T09:44:33+00:00","remoteAddr":"45.84.168.92","user":"endo","app":"music","method":"GET","url":"/nextcloud/index.php/apps/photos/service-worker.js","message":"/appinfo/app.php is deprecated, use \\OCP\\AppFramework\\Bootstrap\\IBootstrap on the application class instead.","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36","version":"20.0.8.1"}

But webserver error.log shows something interesting:

[Fri May 14 06:25:18.334660 2021] [mpm_event:notice] [pid 1828:tid 139996405553024] AH00489: Apache/2.4.18 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
[Fri May 14 06:25:18.334855 2021] [core:notice] [pid 1828:tid 139996405553024] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 14 11:44:21.167768 2021] [access_compat:error] [pid 25723:tid 139996187055872] [client 46.84.168.92:56854] AH01797: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri May 14 11:49:45.191233 2021] [proxy_fcgi:error] [pid 25723:tid 139996136699648] (70007)The timeout specified has expired: [client 46.84.168.92:56855] AH01075: Error dispatching request to : (polling)
[Fri May 14 17:15:59.185950 2021] [autoindex:error] [pid 25723:tid 139996145092352] [client 191.111.217.35:9677] AH01276: Cannot serve directory /var/www/crack.de/public_html/images/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
[Fri May 14 18:34:31.642608 2021] [autoindex:error] [pid 25722:tid 139996295640832] [client 191.111.217.35:34081] AH01276: Cannot serve directory /var/www/davidstrohmayer.de/public_html/images/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive
[Fri May 14 22:51:26.001528 2021] [proxy_fcgi:error] [pid 25722:tid 139996052772608] [client 95.226.96.242:32948] AH01071: Got error 'PHP message: PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /var/www/piwik/libs/upgradephp/upgrade.php on line 180PHP message: PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /var/www/piwik/libs/upgradephp/upgrade.php on line 194PHP message: PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /var/www/piwik/libs/upgradephp/upgrade.php on line 194PHP message: PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /var/www/piwik/libs/upgradephp/upgrade.php on line 200PHP message: PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /var/www/piwik/libs/upgradephp/upgrade.php on line 202PHP message: PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /var/www/piwik/vendor/piwik/ini/src/IniReader.php on line 236PHP message: PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /var/www/piwik/vendor/piwik/ini/src/IniReader.php on line 250PHP message: PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /var/www/piwik/vendor/piwik/ini/src/IniReader.php on line 250PHP message: PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /var/www/piwik/vendor/piwik/ini/src/IniReader.php on line 257PHP message: PHP Deprecated:  Array and string offset access syntax with curly braces is deprecated in /var/www/piwik/vendor/piwik/ini/src/IniReader.php on line 259PHP message: PHP Notice:  Trying to access array offset on value of type int in /var/www/piwik/core/Tracker/Db/Pdo/Mysql.php on line 48PHP message: Error in Matomo (tracker): SQLSTATE[HY000] [1045] Access denied for user 'piwikuser'@'localhost' (using password: YES)', referer: https://crack.de/

My question would be, where are the old files located? And can i remove them manually?

I am afraid the files are going to be overwritten and the remaining old files are in your Nextcloud directory and can’t be deleted manually because you don’t know which are the old ones.

The issue could be a file which is not owned by www-data:www-data and can’t be deleted therefore.

That would be just strange. I bet Nextcloud makes sure that new files and old files are not mixed but in different folders.
I’ve also chowned the whole Nextcloud folder so that it belongs to www-data now. Still the same issue. So that wasn’t the cause of all of this.

Did you look into the Nextcloud data folder as well? There is a folder like “updater-XXXXXX”

Yes it’s there. However i’d like to resolve this so that i can complete the update if possible. I don’t want to move things manually if not really needed.

That folder can be removed by hand without any troubles.

oh i just saw that there is also a updater.log :slight_smile: that might help with the exact issue:

2021-05-14T23:57:56+0200 6OLG1ZKAOO [info] rollbackChanges("9")
2021-05-14T23:57:56+0200 6OLG1ZKAOO [info] unlink .step
2021-05-14T23:57:56+0200 6OLG1ZKAOO [info] rollbackChanges - step >= 7
2021-05-14T23:57:56+0200 6OLG1ZKAOO [info] end of  rollbackChanges()
2021-05-15T00:26:07+0200 2Se6CAUQmo [info] request to updater
2021-05-15T00:26:07+0200 2Se6CAUQmo [info] currentStep()
2021-05-15T00:26:07+0200 2Se6CAUQmo [info] POST request for step "9"
2021-05-15T00:26:07+0200 2Se6CAUQmo [info] startStep("9")
2021-05-15T00:26:07+0200 2Se6CAUQmo [info] deleteOldFiles()
2021-05-15T00:26:07+0200 2Se6CAUQmo [error] POST request failed with other exception
2021-05-15T00:26:07+0200 2Se6CAUQmo [error] Exception: Exception
Message: core/shipped.json is not available
Code:0
Trace:
#0 /var/www/nextcloud/updater/index.php(1363): Updater->deleteOldFiles()
#1 {main}
File:/var/www/nextcloud/updater/index.php
Line:908

2021-05-15T00:26:07+0200 2Se6CAUQmo [info] rollbackChanges("9")
2021-05-15T00:26:07+0200 2Se6CAUQmo [info] unlink .step
2021-05-15T00:26:07+0200 2Se6CAUQmo [info] rollbackChanges - step >= 7
2021-05-15T00:26:07+0200 2Se6CAUQmo [info] end of  rollbackChanges()
2021-05-15T00:26:28+0200 rqVDHujhLz [info] request to updater
2021-05-15T00:26:28+0200 rqVDHujhLz [info] currentStep()
2021-05-15T00:26:28+0200 rqVDHujhLz [info] POST request for step "4"
2021-05-15T00:26:28+0200 rqVDHujhLz [info] startStep("4")
2021-05-15T00:26:28+0200 rqVDHujhLz [info] downloadUpdate()
2021-05-15T00:26:28+0200 rqVDHujhLz [info] getUpdateServerResponse()
2021-05-15T00:26:28+0200 rqVDHujhLz [info] updaterServer: https://updates.nextcloud.com/updater_server/
2021-05-15T00:26:28+0200 rqVDHujhLz [info] releaseChannel: stable
2021-05-15T00:26:28+0200 rqVDHujhLz [info] internal version: 20.0.8.1
2021-05-15T00:26:28+0200 rqVDHujhLz [info] updateURL: https://updates.nextcloud.com/updater_server/?version=20x0x8x1xxxstablexxx7x4x15
2021-05-15T00:26:29+0200 rqVDHujhLz [info] getUpdateServerResponse response: Array
(
    [version] => 20.0.9.1
    [versionstring] => Nextcloud 20.0.9
    [url] => https://download.nextcloud.com/server/releases/nextcloud-20.0.9.zip
    [web] => https://docs.nextcloud.com/server/20/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=20.0.9
    [autoupdater] => 1
    [eol] => 0
    [signature] => bk17zYl9/msZ6TYX84ME3BNbyYDR5rO+N/CbO0oMQ3YRNWG0jZEg1VL7B7xJjcue
3elu6YXENmktF7N5JsYIsoazB0HIkJh1NHfSoadfpPn9SabTdsU+lRiw/vdZfv7u
ZpL5CL869fQ/etfOAxme37YzOky17DHbDpjnNDRkGWo+EA7mzd9ptpr9TA1f2d3a
iysQhPdnc44twwMIpwp+3m1llCX7cZa1VCFOZF7qJkZPMW7gTlCZJwZdv+/OWzaB
R0EQjUguzbCoOXc1B33BKYOb1Bq10PHZbdrnQ1S54dvB0LftKyWgtwaAAC/BdOpg
IctRU71WQPSDqMqrwGAAMA==
)

2021-05-15T00:26:29+0200 rqVDHujhLz [info] storage location exists
2021-05-15T00:26:35+0200 rqVDHujhLz [info] end of downloadUpdate()
2021-05-15T00:26:35+0200 rqVDHujhLz [info] endStep("4")
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] request to updater
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] currentStep()
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] Step 4 is in state "end".
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] POST request for step "5"
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] startStep("5")
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] verifyIntegrity()
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] getUpdateServerResponse()
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] updaterServer: https://updates.nextcloud.com/updater_server/
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] releaseChannel: stable
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] internal version: 20.0.8.1
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] updateURL: https://updates.nextcloud.com/updater_server/?version=20x0x8x1xxxstablexxx7x4x15
2021-05-15T00:26:36+0200 FwZmOcXUPN [info] getUpdateServerResponse response: Array
(
    [version] => 20.0.9.1
    [versionstring] => Nextcloud 20.0.9
    [url] => https://download.nextcloud.com/server/releases/nextcloud-20.0.9.zip
    [web] => https://docs.nextcloud.com/server/20/admin_manual/maintenance/upgrade.html
    [changes] => https://updates.nextcloud.com/changelog_server/?version=20.0.9
    [autoupdater] => 1
    [eol] => 0
    [signature] => bk17zYl9/msZ6TYX84ME3BNbyYDR5rO+N/CbO0oMQ3YRNWG0jZEg1VL7B7xJjcue
3elu6YXENmktF7N5JsYIsoazB0HIkJh1NHfSoadfpPn9SabTdsU+lRiw/vdZfv7u
ZpL5CL869fQ/etfOAxme37YzOky17DHbDpjnNDRkGWo+EA7mzd9ptpr9TA1f2d3a
iysQhPdnc44twwMIpwp+3m1llCX7cZa1VCFOZF7qJkZPMW7gTlCZJwZdv+/OWzaB
R0EQjUguzbCoOXc1B33BKYOb1Bq10PHZbdrnQ1S54dvB0LftKyWgtwaAAC/BdOpg
IctRU71WQPSDqMqrwGAAMA==
)

2021-05-15T00:26:36+0200 FwZmOcXUPN [info] storage location: /var/www/nextcloud/data/updater-oc98l5403fa5/downloads/
2021-05-15T00:26:37+0200 FwZmOcXUPN [info] end of verifyIntegrity()
2021-05-15T00:26:37+0200 FwZmOcXUPN [info] endStep("5")
2021-05-15T00:26:37+0200 WnJg7sKQLB [info] request to updater
2021-05-15T00:26:37+0200 WnJg7sKQLB [info] currentStep()
2021-05-15T00:26:37+0200 WnJg7sKQLB [info] Step 5 is in state "end".
2021-05-15T00:26:37+0200 WnJg7sKQLB [info] POST request for step "6"
2021-05-15T00:26:37+0200 WnJg7sKQLB [info] startStep("6")
2021-05-15T00:26:37+0200 WnJg7sKQLB [info] extractDownload()
2021-05-15T00:26:37+0200 WnJg7sKQLB [info] storage location: /var/www/nextcloud/data/updater-oc98l5403fa5/downloads/
2021-05-15T00:26:57+0200 T3kkzNzx0i [info] request to updater
2021-05-15T00:26:57+0200 T3kkzNzx0i [info] currentStep()
2021-05-15T00:26:57+0200 T3kkzNzx0i [info] Step 6 is in state "start".
2021-05-15T00:27:05+0200 coGDB8tBj3 [info] request to updater
2021-05-15T00:27:05+0200 coGDB8tBj3 [info] currentStep()
2021-05-15T00:27:05+0200 coGDB8tBj3 [info] Step 6 is in state "start".
2021-05-15T00:37:27+0200 R0o5OBrq2a [info] request to updater
2021-05-15T00:37:27+0200 R0o5OBrq2a [info] currentStep()
2021-05-15T00:37:27+0200 R0o5OBrq2a [info] Step 6 is in state "start".
2021-05-15T00:40:07+0200 CaW9tkvvEq [info] request to updater
2021-05-15T00:40:07+0200 CaW9tkvvEq [info] currentStep()
2021-05-15T00:40:07+0200 CaW9tkvvEq [info] Step 6 is in state "start".

But let’s say i remove the updater-XXXXXX folder, how do i proceed after that?

Just run the updater and that folder will be created again

I’ve removed the folder but how do i run the updater again? When i try to access the website i get this: Update in process. Or maybe i should do the update over the command line?