On my Ubuntu Budgie 19.10 I have an ext4 partition mounted in /mnt/Data
. Moreover, I've mounted every home folder with a specific folder in /mnt/Data
(using bind, no symlinks). fstab
file is the below one:
# /dev/sda3
UUID=xxxxx /mnt/Data auto nosuid,nodev,nofail,x-gvfs-show 0 0
# home folders
/mnt/Data/Desktop /home/<user>/Desktop none rw,bind 0 0
/mnt/Data/Documents /home/<user>/Documents none rw,bind 0 0
/mnt/Data/Download /home/<user>/Download none rw,bind 0 0
/mnt/Data/Pictures /home/<user>/Pictures none rw,bind 0 0
/mnt/Data/Music /home/<user>/Music none rw,bind 0 0
/mnt/Data/Video /home/<user>/Video none rw,bind 0 0
However, when I try to delete a file in one of the home folder (for instance, Download) I have the error message "impossible to move the file to trash, do you want to delete it immediately?"
This is the output of ls -la /mnt/Data
:
<user>@<user>-home:~$ ls -la /mnt/Data
drwxrwxr-x 12 <user> <user> 4096 gen 19 16:52 .
drwxr-xr-x 3 root root 4096 ott 31 2017 ..
[...]
drwxrwxr-x 5 <user> <user> 4096 gen 26 19:05 Desktop
drwxrwxr-x 5 <user> <user> 4096 set 22 22:15 .Trash-1000
My question: how can I move my files to the Trash? I've read a lot of questions about it concerning proper ownership of the folder, but I was not able to solve this issue.
In my current installation of Ubuntu 20.04 LTS I bypassed the problem replacing the bind-mounted directories with symlinked directories.
For instance:
rm -rf ~/Download && ln -s /mnt/Data/Download ~/Download
However, continuing my research about this issue, I found the following resource: Bug 70831 - Bind mount doesn't allow to trash files and directories .
In other words, the function rename(2) throws the error
EXDEV
when its input/output parametersoldpath
andnewpath
are in different mountpoints:Therefore, as also stated in a comment: