Nextcloud version: 24.0.4.1
Operating system and version: Debian 11.4
Apache or nginx version: Apache 2.4.54
PHP version: 7.4.30
config.php: <?php$CONFIG = array ( 'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxx', ' - Pastebin.com
Log file (isolated around the issue): {"reqId":"NtqlTVXVZAUY0SmYJJ72","level":0,"time":"August 12, 2022 23:45:01","rem - Pastebin.com
Hi,
New to this forum - hoping to find help to a somewhat serious issue I have.
Background:
Personal use (two users) Nextcloud installation on a Debian ‘stable’ machine. Using Nextcloud for quite some time now, initially started when it was still Owncloud.
Not that much data stored inside - perhaps 25GB, 5000 files or so. Using Nextcloud for file storage, calendar and contacts. Mobile clients (iOS and Android), desktop clients (windows 10) in use. And, perhaps most relevant, also some folders mounted on the same Debian box using five davfs mounted folders (via systemd mount/automount scripts).
So, I guess two months ago, I noticed a complete deletion of ~300 files & directories in Nextcloud. All in my user and all from a few of these davfs mounted folders. At the time I simply restored these from the trashcan inside Nextcloud and didn’t investigate any further. Yesterday… same thing happened, so spend time on restoring this all again.
Worth mentioning: last Friday I’ve upgraded from 24.0.3 to 24.0.4 early in the morning. From the logs, it seems like the removal of all these files started at the end of Friday, at 23:45 or so. Perhaps also worth mentioning: all the deletions happened within a davfs mounted directory - but one davfs mount was not affected. No idea why, as the mount scripts are nearly identical and there is nothing that stands out on this one not-affected directory. I’m not sure, but it is possible that also the previous time I had this issue was after a Nextcloud upgrade.
Partial theory I have at the moment:
Perhaps the davfs folders are not actively mounted at some point in time; then the mount points are empty directories and perhaps some Nextcloud cron job then decides to synchronoize (and delete from the nextcloud). If so… I don’t understand why this one davfs mount is not affected (looking at the current mount status, no davfs mount is active right now - it gets automatically mounted when accessing a directory). Also don’t understand why this massive deletion doesn’t happen more often.
So, log files. I’ve downloaded the nextcloud.log, isolated the file a bit (starting from 23:45 when the Nextcloud cron job starts and ending when the first file is deleted). Looking into this:
-
at some point, I see a message “CLI cron call has selected job with ID 963”. What does this ID 963 mean?
-
then the cron job seems to scan several of my directories within my nextcloud with message “No public access to this resource., No ‘Authorization: Basic’ header found. Either the client didn’t send one, or the server is misconfigured, No ‘Authorization: Bearer’ header found. Either the client didn’t send one, or the server is mis-configured, No ‘Authorization: Basic’ header found. Either the client didn’t send one, or the server is misconfigured”
-
Following each of above messages, it also complains “Token is not valid: Token does not exist: token does not exist”. I’ve seen complaints about this message in my Google search results, but not related to a massive deletion action.
-
After all complaints about several folders, it starts deleting files. Message with the deletion is again “Token is not valid: Token does not exist: token does not exist”
Furthermore: no errors in the log file (well, only a few during my attempt to move files from trashcan back to nextcloud, but that was half a day after the deletion).
I’m hoping someone can explain a bit what can be seen in the log and perhaps link it to a likely root cause for this issue.