How to restore shared files that been deleted by other users?

The admin user has shared some folders and files to a group of users. But recently some files have been deleted by other users. Questions:

  1. Is there any way, from web, client or server side, to see who deleted those files and which files have been deleted?
  2. Is there any way to restore those files by admin or other users?

I don’t know why the files were deleted from the share folder. But I think it might related to the following things.

Originally, we have a group of local users. They may or may not completed downloaded all the shared files to there local sync folders via the client.

Recently, we changed to LDAP authentication. We want the users to keep the same user name. So we deleted the local users, and imported the LDAP users with the same user names. The users removed their local user account from the client, and added the new LDAP user accounts. But they chose to use the original local sync folders.

In this case, I don’t know how nextcloud handles the sync folder contents. There were half synced with the server before. Will this operation delete the files that are not present in the local sync folders from the server?

If this is true, I think it’s dangerous. Maybe we shouldn’t allow user to use an old local sync folder.

Thanks.
Aric

if you have access to the filesystem and the files are not encrypted you can search there.

did you check the trash bin? (bottom left in the files view)

2 Likes

if user A deleted the files shared by admin, are the files going to admin’s trashbin, or user A’s trashbin?

I have access to the file system and they’re not encrypted. Because there’re a lot of files, I don’t know which files should be restored, and which should not.

Is there a operation log indicating who deleted which files? How can I restore those files?

I have figured out who deleted the files and now I’m restoring them. Thanks.

It is so obvious, yet I missed it. I was able to restore files that were shared with me (which I accidentally deleted) from my trashbin. So the actual owner of the files didn’t have to do anything.

I hope I’ll not need this again, but if I do, I’ll remember where to look.

Hello everyone, where are the files stored by default?

You can find the files under /path/to/nextcloud/data (value datadirectory in config/config.php). There are also trash folders. Please also make backups of this folders.

1 Like

Thank you very much!
I will look for the files that the user deleted and return the result here.
Tks.