desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Add a warning / confirmation to prevent mass deletion of files / folder locally when a folder is removed from the server - especially for Group Folders

Open avatar1024 opened this issue 3 months ago • 5 comments

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Feature request

Which Nextcloud Version are you currently using:

  • Server: 32.0.0
  • Desktop Client: 3.16.3

Is your feature request related to a problem? Please describe. If the Group Folders (now Team Folders) app fails (due to update or otherwise), then all files in group folders gets deleted locally. I guess similarly if a user delete an entire folder.

Describe the solution you'd like Would be great if the desktop client had some sort warning or ask confirmation before deleting an entire Group Folder (and maybe a way to detect if the app has stopped running). Or even better, a warning/confirmation for any folder bigger than X amount of file/GB that gets removed from the server, with that said amount being configurable by the user, in the same way we can configure the size of new folder which requires a confirmation before syncing.

Additional context https://github.com/nextcloud/desktop/issues/8784

avatar1024 avatar Oct 03 '25 11:10 avatar1024

Hello,

is it really an issue for the client? For the client there is no difference if the server disables the Team Folder App or a Team Folder was removed on purpose (or its authorisations). In the last occurrence, the client is expected to remove all files locally because at the end of the day the client is not supposed to have the files - decided by the owner.

To create a dialog that tells you "you lost access to files, do you still want to keep them?" seems wrong. Also if you keep the files, the Client will then have files not known to the server and will start uploading them again.

the NC client is a sync tool and always has to mirror the server

Rello avatar Oct 08 '25 03:10 Rello

Thanks for your reply :)

With regards to:

the client is not supposed to have the files - decided by the owner.

This idea is mostly correct but not totally accurate. As a user, given I have had access to those files, I could have made copies, keeps tons of backups and in fact never loose access to those files. What the admin can do is rescind my access to any new changes in those files by purposefully removing my access to a given sync folder, with ideally an option for the admin to say "remove the files locally from clients" (Dropbox has had that option for over a decade - not that I have used Dropbox since then 😅).

So overall, I cannot see a good reason for the client to NOT have a warning about mass files being about to get deleted when particular events happen. e.g. another user simply deleting a whole shared folder (which could be done by accident), the Group Folder app getting disabled / broken, etc. . However for other events, like a user/admin purposefully removing access to another user (which is something that cannot really be done accidentally), then ideally there should be option - like in Dropbox - asking that user/admin whether or not to removing the files locally from clients, or missing that, the default being removing from clients is fine in that case.

Also if you keep the files, the Client will then have files not known to the server and will start uploading them again.

That isn't true. If my rights to a given folder is removed (accidentally or intentionally), then by definition I cannot sync to that folder any more and so I cannot upload back files that would remain on the client side. However, the access loss arose from an accident and my right to the folder is restored, then there will be much less syncing to do if I'd been able to keep my files locally.

the NC client is a sync tool and always has to mirror the server

I of course see the perspective that server and client should be a mirror of each other. Yet, with any sync systems there are exceptions to this rule. Say with conflicted copies of a file, I might have two files sitting on my computer (the client), while only one is on the server, and as a user I am prompted to choose what to do about it. This means that NC already has a way to mark files present in client that should not be automatically uploaded back to the server (not that this is very relevant to the issue here).

avatar1024 avatar Oct 08 '25 10:10 avatar1024

I think this should have been built into the client right from the start. Even before the group folders feature was available, we have always seen the risk of mass deletions and experienced several of those. Often you want a team of users with delete privileges to collaborate on sth. It could also be implemented as an optional setting - perhaps right next to „Ask for confirmation before synchronizing new folders larger than…. MB“?

hansduo avatar Oct 20 '25 08:10 hansduo

@Rello A warning when propagating a deletion from server to desktop is one thing, but it also would be useful (and much less finnecky semantically) to warn when propagating a deletion from desktop to server, something along the lines of "you have deleted 999 files on this computer, do you want to delete them on the server? [also delete on server] [cancel deletion and restore files on this computer] [do nothing and contact this NC instance's support team]"

suzanne-soy-arawa avatar Dec 05 '25 15:12 suzanne-soy-arawa

@suzanne-soy-arawa if that is the case, then such change should be done on the server side. this would make that the server would catch a big deletion from any type of client.

camilasan avatar Dec 05 '25 17:12 camilasan