Since serveral versions, the web updater regulary fails at the “Delete old Files” step. When then the update is retried, it works without failure. This is just annoying.
There is one file which is not owned by the webserver therefore it can’t be deleted.
But why does it succeed on second attempt? And my complete nextcloud directory is owned by the webserver.
I would say a timeout; at the second attempt, some of the process has been done, so it takes less time.
Next time, try to do it trough CLI, no timeout prone, and you’ll be fixed.
Yeah CLI is the most “stable” update method. Especially because you can automate your entire update flow:
OCC commands for Maintanence mode, update, sanitize, turn off maintenance mode
CURL the monitoring url for health check