Deleted files in shared folder take twice the disk space
Steps to reproduce
- Create user1, user2
- Create folder1 from user1 and share it with user2
- Create a big file (few GBs) in folder1
- Login as user2
- Go to folder1 and delete the big file
Expected behaviour
Everything is smooth. After a reasonably brief loading period, both user1 and user2 can see this file on their deleted files in the web ui. On the file system, the file is moved somewhere and there's magic code/database glue to be able to get the location of the file from both user1 and user2.
Actual behaviour
The file has the little loading icon on it until a timeout with an error deleting file "bigFile". The file actually gets deleted and both user1 and user2 can see this file on their deleted files in the web ui. However, the file is now in both data/user{1,2}/files_trashbin/files/bigFile and taking twice the disk space it used before deletion.
Server configuration
Nextcloud version: 11.0.5 and 13.0beta1
Updated from an older Nextcloud/ownCloud or fresh install: Updated and clean git install
List of activated apps: Files_trashbin, versions, etc. (default git install)
Are you using external storage, if yes which one: local
Are you using encryption: no
Nextcloud log (data/nextcloud.log)
None
Extra thoughts
I realize this behaviour is probably a feature (for the simplicity it brings to trashbin handling), not a bug. However deleting ~100 GB of old files only to see it now take 200 GB of disk space was really surprising. Also note that this behaviour is also probably similar with external storage [#7223].
The file has the little loading icon on it until a timeout with an error deleting file "bigFile". The file actually gets deleted and both user1 and user2 can see this file on their deleted files in the web ui. However, the file is now in both data/user{1,2}/files_trashbin/files/bigFile and taking twice the disk space it used before deletion.
This is intentional so that both (deleter and owner) can restore the file afterwards.