NextCloud randomly deleting files from server

Nextcloud version (eg, 20.0.5): 21.0.1
Operating system and version (eg, Ubuntu 20.04): Debian 10
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38
PHP version (eg, 7.4): PHP 7.4

Hi guys,

Actually, we are facing a problem with our NextCloud installation.

We got NextCloud instance on our own Debian server, then we are syncing the files to our private Windows Server, where the files are stored too (like some double backup).
We got around 15 accounts connected to this server.

And the big problem is, sometimes the NextCloud just randomly deleting some folders from the server. The deleted folders are then in the trash bin, and from the Activity log we see, these files are deleting by a random account. This error with deleting files happened like 20 times in the last 2 months.

We got the latest version of NC on the server, even the latest Clients installed.

Can you give us some hint, where can be the problem and we should look for?

Thanks a lot.

I’d check when the last time happened and then check the logfiles. First, the apache access logs, take a file and grep through the logfile, if you can find the DELETE command for it. This should appear when it was deleted by some access via a NC client or webinterface (you can check the message if you just delete a file and see what kind of message it creates).
If it was a client, I’d check if it was always the same and find some systematic…

If there is nothing, I’d check other logs from nextcloud. Was it happening during a cron-job? There is the file-retention function you can set up to delete files automatically. Was that set up by accident?

It happened multiple times to us as well.
It occurred with a Linux NC client which disk was full. The NC client started to issuing DELETE commands apparently at random. I have not yet submitted the issue. We are apparently having the same problem with the Windows NC client (to be confirmed)