GNOME Bugzilla – Bug 743739
Can't move to trash in data partition
Last modified: 2021-06-18 15:53:42 UTC
Created attachment 295802 [details] Some strace results I have a clean install of Ubuntu 14.10. I partitioned my disk into / (20GB) and /data (230GB) partitions. I then created /data/home/ubuntu, moved my /home there, and bind mounted /home to /data/home/ubuntu. I then created symlinks for ~/Downloads, ~/Music, etc... to /data/Downloads, /data/Music, etc... Whenever I delete files directly inside ~/ they seem to go to the Trash (in ~/.local/share/Trash), but when I try to delete files in other folders that are linked to /data (for example ~/Downloads, or /data/Downloads) Nautilus says: "File can't be put in the trash. Do you want to delete it immediately?". To fix it, I attempted to create trash folders with permissions 1700 and chowned to my user in the following places (to no avail!): * /data/.Trash-$(id -u) * /data/.Trash * /.Trash-$(id -u) * /.Trash I've done a couple of straces of nautilus while attempting to delete some files. In the cases where it fails deleting a file in the /data partition, I don't understand why it isn't looking for a /data/.Trash folder and instead trying to move the deleted file to ~/.local/share/Trash which obviously fails.
This issue is related to bug #637800: The linux kernel cannot move files between two different (primary/bind) mounts of the same partition. However, glib/gio does not detect these mounts to be different and therefore trashing fails in the situation described above. Even though the issue is not exactly the same, I propose to mark this a duplicate of bug #637800.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Files (nautilus), then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/nautilus/-/issues/ Thank you for your understanding and your help.