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


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.