I'm trying to set up shared home directory for two Linux installations and thus I'm using bind-mounts. My user is named dbz
and his home directory is /home/dbz
. I also have shared directory /home/shared
where I store my shared files (this folder is also owned by user dbz
).
I mount another directories from this shared directory into my home directory using binding:
mount -B /home/shared/work /home/dbz/work
This solution solves my needs and the only issue I have and don't know how to resolve is - when I'm trying to delete a file or directory from mounted directory I cannot delete it to trash, only permanent deletion is possible. For example:
- deleting file
/home/shared/work/test.txt
: OK, because deleting right from the directory where the filetest.txt
resides; - deleting file
/home/dbz/work/test.txt
: CAN'T, because... by the way, because what? do bind-mounts have some restrictions on file deletion?
/home/shared
and/home/dbz
on the same filesystem? (i.e./home
is a mount point) What you are describing is a cross device link;mv
works by creating a link and removing the original. When the src and dst are in different mounts, this cannot happen. (the bind should be transparent to the process.)/home
is a mount point, so/home/shared
and/home/dbz
are on the same filesystem and even on the same mount point. All I do is bind-mount folders in/home/shared
to folders in/home/dbz
gvfs
. I've found an old bug description here and seems it still not fixed.