0

I have a filesystem mounted under my home dir. For example, /home/user/mount/.

I have a directory /home/user/mount/Downloads. And I have created a soft link to it with /home/user/Downloads.

When I am using nautilus and I am under /home/user/Downloads, I try to move file to trash, it says:

can't be put in the trash. Do you want to delete it immediately?

However, I can move it to trash when I am under /home/user/mount/Downloads.

Does any body know why and how to solve this problem?

1 Answer 1

0

I've had the same problem, and then I made it worse!! (I'm sharing the big folders from home with a Suse gecko!

Alas the problem lies with the file ownership and rights! It seems that on Unix compliant drives, all the rights to the files and folders belong to root. Root created the .Trash-Xxxx when we evoked a Trash operation. So we need to chown it to our-self and our main group (that normally is our name too (except in Suse and the like where it is users!). Now we need to set the rights, all folder-operations are ruled by the guid not the uuid so we need to append those rights, so go into the folder containing the .Trash-uuid, and run:

chmod g+wx -R .Trash-1000

g+wx sets the write and execute rights for your group. -R do it recursively Beware your uuid could be different so change it to match yours. Now set the execute bit for your user, sometime (mostly) they are missing!

chmod u+x -R .Trash-1000

Now you need to log out and back in (or reboot) to introduce the changes to the OS.

Now it should work, but there will be a lot of cleaning up (after our-self). Most of the trash folders in the shared folders can be removed (BUT wait a week so you are positive they are no longer in use!

So Symbolic links works with Trash, bind-links do not!

I had to use the T flag when creating the symlinks:

ln -sT /mnt/(Disk/Partition)/Pictures/ /home/UUID/Pictures

All of this is elsewhere on this site, I just found these helpfull bits!

1
  • Thanks for answering. For the first method, my disk was mounted under a home dir which is /home/user/disk. And the .Trash-1000 in it is owned by my user. At the same time, I cannot delete only files but not directories. So I don't think it's an file permission issue. I tried the second method(using -T with absolute paths), but looks like it doesn't work. But thank you anyway.
    – dspjm
    Dec 21, 2016 at 0:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .