Update error: Delete old files Could not rmdir /var/www/html/nextcloud/updater/../themes/example/

Hi,

Tried updating from 16.0.1 to 16.0.3 and it seems to have failed. I thought it was a permissions issue but I can’t seem to find it. All files and dirs have apache and 755 set to them… any ideas.

The update stops on “delete old files”.

Also in the error of the update it references a path “/var/www/html/nextcloud/updater/…/themes/example/” but “…/themes/example/” does not seem to exist. The only files in there are “index.php” and “updater.phar”.

Anyone knows what to do?

Here is the output from ls -l.

drwxr-xr-x. 32 apache apache  4096 Jun 21 16:42 3rdparty
-rw-r--r--.  1 apache apache 12063 Jun 21 16:42 AUTHORS
-rw-r--r--.  1 apache apache 34520 Jun 21 16:42 COPYING
drwxr-xr-x. 22 apache apache  4096 Aug  6 15:16 apps
drwxr-xr-x.  2 apache apache    41 Aug  6 15:16 config
-rw-r--r--.  1 apache apache  3805 Jun 21 16:42 console.php
drwxr-xr-x. 23 apache apache  4096 Jun 21 22:03 core
-rw-r--r--.  1 apache apache  4986 Jun 21 16:42 cron.php
drwxrwx---.  7 apache apache   204 Jun 21 20:25 data
-rw-r--r--.  1 apache apache   156 Jun 21 16:42 index.html
-rw-r--r--.  1 apache apache    57 Aug  6 15:16 index.php
drwxr-xr-x.  6 apache apache   125 Jun 21 16:42 lib
-rw-r--r--.  1 apache apache   283 Jun 21 16:42 occ
drwxr-xr-x.  2 apache apache    23 Jun 21 16:42 ocm-provider
drwxr-xr-x.  2 apache apache    55 Jun 21 16:42 ocs
drwxr-xr-x.  2 apache apache    23 Jun 21 16:42 ocs-provider
-rw-r--r--.  1 apache apache    57 Aug  6 15:16 public.php
-rw-r--r--.  1 apache apache    57 Aug  6 15:16 remote.php
drwxr-xr-x.  4 apache apache   107 Jun 21 16:42 resources
-rw-r--r--.  1 apache apache    26 Jun 21 16:42 robots.txt
drwxr-xr-x. 12 apache apache   248 Jun 21 16:42 settings
-rw-r--r--.  1 apache apache    57 Aug  6 15:16 status.php
drwxr-xr-x.  3 apache apache    21 Aug  6 15:16 themes
drwxr-xr-x.  2 apache apache    43 Jun 21 16:42 updater
-rw-r--r--.  1 apache apache   362 Jun 21 16:42 version.php

What’s “ls -l” in the themes directory?

If there is no examples directory, you may want to try to mkdir the examples directory to see if that allows the upgrade script to delete it and move on. I wouldn’t expect the non-existence of a directory to stop a script which is trying to remove said directory, but it could happen.

Thanks for the recommendation, these are the contents of the updater directory:

-rwxr-xr-x. 1 apache apache 63216 Jun 21 16:42 index.php
-rwxr-xr-x. 1 apache apache 599747 Jun 21 16:42 updater.phar

I can try to make the dir as you mention, problem is that the path is shortened… (updater/…/themes) so I have no idea what the complete path should be.

I’ll give it a shot and report back, thanks!

No luck so far, but thanks for the suggestion!

I am having this same issue! Update gets stuck on deletion task. Mine gets stuck on Could not rmdir: /var/www/html/updater/../ocs but it’s essentially the same thing you are seeing. I simply cannot get past this and turning maintenance mode does not help. My next cloud is essentially unusable. Have you had any progress?

Same issue here, and how lovely that there is absolutely no follow-up on what is basically a show-stopping fatality - leaving the NextCloud instance in an unusable state, with what appears to be zero help.

This is still happening with the current version 18.0.7 - only way to recover is to perform a perillious manual upgrade. The automatic updater should simply be disabled.

Necroing this because it still happens!
:x: Delete old files:
Could not rmdir: /var/www/html/updater/…/resources

“/var/www/html/updater/” only has 2 files in it: “index.php” and “updater.phar”
And because there’s a “/…/” in the path I can’t create a folder just to get past this stupid error.

@tonytonyistony
Did you ever find a fix for this? I have been working on this for 3 days and about to get rid of nextcloud. I’m in the “Update in Process.” error and NextCloud will do nothing. I am using unRaid and have played with permissions and upgraded/downgraded images, etc… I cannot get it to work. Is there any work around? Current error:

[:heavy_check_mark:] Check for expected files
[:heavy_check_mark:] Check for write permissions
[:heavy_check_mark:] Create backup
[:heavy_check_mark:] Downloading
[:heavy_check_mark:] Verify integrity
[:heavy_check_mark:] Extracting
[:heavy_check_mark:] Enable maintenance mode
[:heavy_check_mark:] Replace entry points
Delete old files …PHP Warning: rmdir(/config/www/nextcloud/updater/…/resources): Directory not empty in phar:///config/www/nextcloud/updater/updater.phar/lib/Updater.php on line 871
[✘] Delete old files failed
Could not rmdir: /config/www/nextcloud/updater/…/resources

Update failed. To resume or retry just execute the updater again.


Thanks for any help!

@theloaf Did you ever get yours fixed? I’m having the same issue and been working on it for days. Thanks

@rmoran
Are you on Matrix?

@dal:matrix.selfhosted.games hit me up.