Data suddenly deleted while syncing


I want to report a strange scenario that happens today after I created a new user and sync files where the files/directories that was chosen not to be synced got deleted automatically

Here is what happened!

  1. Admin creates an X user with admin privilege

The x User

  1. Downloads the desktop software for windows 10.
  2. Gives login data, and chooses to sync only particular directories/subdirectories (2.2 GB out of 17GB)
  3. Pauses the sync process manually due to internet issues (some sync errors were shown in the activity list)
  4. Resumes the process after ~10minutes
  5. All those directories that has been chosen not to be synced were suddenly disappeared from all users.
  6. Later, those directories/files were found on “deleted files” (in the admin’s account) via nextcloud web interface, when they where restored from.

Any idea how this could have happened and why?

Nextcloud 10.0 (stable)

Users: 5
Files: 35275

Version: 7.0.14
Memory Limit: 512.0 MB
Max Execution Time: 3600
Upload max size: 513.0 MB

Type: mysql
Version: 5.5.53
Size: 86.4 MB

Your version is 10.0.2? No -> please update

In point 5 you write that the files disappeared from all users. Is this a shared folder? External storage? The exact situation would be required to exactly reproduce the situation. Can you reproduce the same thing for a smaller folder structure (is it repeatable)? Logfiles would be helpful as well.

Hey tflidd,

Thanks for reply.

This happened to a shared folder, in an internal storage.

May you help me where I can find LogFiles you required so I can send to you for a check?


I don’t know how, maybe the same scenario. But users had complained about lost directory and might be with new user got involved into the „project“. It was shared directory and all of its contents are in trash at the moment.

I am currently on FreeBSD11, have the latest version 11.0.1 from ports on nginx. And I am not even unable to find out, how it got moved to trash or by whom. Until yesterday got it running over php56, but after user complained, tried to upgrade to PHP 7.1 dunno if it will fix the issue into the future.

Petr Sourek

Do you use the encryption app?
Any references in the logfiles, can you trace who deleted the files?


sorry for late reply, I had too much work at the week.

Well I do not use encryption, it is the thing back from OwnCloud, where there people had problems with upgrades so I had not switched it yet. So all the data are unencrypted.

The log back then shows only messages like this:
{“reqId”:“dodQundWcjZIdQ2lPq0c”,“remoteAddr”:“192.168..",“app”:“PHP”,“message”:“Module ‘gd’ already loaded at Unknown#0”,“level”:3,“time”:“2017-02-21T19:59:55+00:00”,“method”:“PROPFIND”,“url”:"/remote.php/webdav/",“user”:“matej.haase”,“version”:“”}

This I had resolved later on with config files for PHP. But nothing about who deleted it. The files were at the trashbin of person who shared it to us. I guess, when I delete something shared to me, it goes to my trashbin, so it should have been deleted by the person who shared it?

I don’t get complains yet, the new person got synchronized (after undelete) and noone complains yet, but as an IT guy I would like to find why the data had disappeared, so I can take precautions (of course I have rsync backups).

Petr Sourek

That’s right, it should go to the person who shared it and also into the trashbin of the person who deleted it.

If you check the webserver logfile, you can perhaps find the ip of the person who deleted the file. Now it’s hard to reproduce but you should keep an eye on it in case there is a problem.

It’s too old for this I turn access logs every night. But next time I will take a look. Thank you.

I will keep an eye out. Thanks.

Same thing might have happened to me. All of a sudden a ton of files disappeared. After reading that thread I found out that one other user who isn’t the owner had half the database in his trash bin. I am very certain he didn’t delete it.

This is really disturbing and makes me wonder if I can use the next cloud as a productive environment