In my usecase (small team), mistakes happen: people accidentally move huge directories, people accientally delete a lot of files. Sometimes the server or sync client does funny things, and files become 0 bytes in size. Luckily I can restore files from trash, or move directories back. But how do I find out that something went wrong?
Enter the app “Monitor File & Directory Changes”.
Settings/capabilities:
show directories where more than X files were deleted within a 1 hour period
show directories where more than X files were added within a 1 hour period
show deleted directories
show files whose size has decreased more than X MB (or X percent?)
show files with file size 0 B
The view would be just like the view for the server log, and it would refresh automatically, and show you the most recent events, and if you scroll down you see older events.
I am actually surprised I cannot find desktop apps that do this. There is qdirstat which goes in that direction, but I would have to write scripts to work with it’s output, and I can’t do that.
@alexanderdd
The problem is that Nextcloud is a software for collaborative work. Users can intentionally or unintentionally modify files and folders based on their access rights. Mechanisms such as the recycle bin try to address some of these errors.
I could imagine that within statistic tools certain evaluations are conceivable. But I think that your wishes go too far. It is at least for me normal that I move whole directories into the trash from time to time and delete them afterwards.
As a tip I would like to recommend the app Group folders. Here you can prevent the deletion of files and folders through limited user rights.
Maybe you can use tools outside of Nextcloud. But far more important are backups
I don’t want to remove write access or prevent the deletion of folders, because often, the user action is intentional/correct/necessary. I just want a way to monitor big changes, without looking at all changes in the activities app.
Maybe it’s also an idea to have a sidebar entry “big/unusual changes” in the activities app?
Do you make (incremental) backups e.g. with rsync --link-dest? Maybe you can use the log of the incremental backup to find anomalies. Important is actually only to control the daily backup.
But yes. just as there is intrusion detection, it might be nice to be able to detect user anomalies if you can reasonably determine when that is the case.
I often copy full directorys and delete them afterwards. Hopefully the backup is correct and on error there is a restore.
Looking at those logs might be an idea, thanks. Anyway, I was hoping for an easy overview, potentially within Nextcloud. But yeah, if I am the only one who needs it, it’s probably not gonna happen.
The same problem used to exist with network drives. It also happens that someone accidentally deletes or moves something. There are probably no better solutions than the backup from the day before. Since errors are often detected late, it is also necessary to keep older backups on hand.
Your idea is cool, but use the existing tools like group folders and workspace to address your issues with deletion.
Take a look at user groups and how they work. Sounds like you haven’t used them, so definitely worth a try. Thankfully, these tools allow a more granular approach than one would assume.