6

I have noticed that when interacting with files on other drives, I only have the option to delete files permanently, and I don't have the option to send them to the trash instead. This creates a rather risky operation where if I accidentally delete something which I did not intend, I cannot retrieve it.

How do I give other drives the option to send files to trash instead?

  • OS Version: Ubuntu 21.04
  • Kernel Version: 5.11.0-17-generic

This is the format for what I have in /etc/fstab for the drive where I am experiencing the issue:

UUID=<UUID_string_here> /mnt/<drive_name> ntfs auto,rw 0 0

EDIT 1: I have also tried what was said here, and it did not work.

EDIT 2: The permissions on the Trash-1000 folder are drwxrwxrwx.

EDIT 3: Could it be because the filesystem is NTFS that it doesn't support the trash functionality?

12
  • @Levente version info edited into main question as per your request. File manager is whatever is stock with Ubuntu - Nautilus I think. It only allows a permanent delete when I delete a file on a separate drive. If I am on the drive/partition that Ubuntu is installed on, I am able to send things to trash. For the last bits of your question, It has always behaved this way for me afaik.
    – Kalcifer
    May 2, 2021 at 4:14
  • Open your "other drive" in Nautilus and set it to display hidden files and directories. On my Ubuntu 20.04 the quick shortcut for that is ctrl+H. With hidden files displayed, look for a directory, similar to .Trash-xxxx. That's the trash for that drive. You can enter it, find stuff within it, and restore it, just like from the main trash folder. (I don't know where to configure this behavior; but it behaves like this as default on my Ubuntu 20.04) (You can even delete the .Trash-xxxx dir itself. Next time you delete something, it will be re-created anew.)
    – Levente
    May 2, 2021 at 4:17
  • @Levente I see the file that you are talking about; however deleted files don't seem to be sent there. Like I said, I only have the option to delete permanently, and not to send to the trash, no matter where the trash may be.
    – Kalcifer
    May 2, 2021 at 4:19
  • Do a quick experiment with a (you-think-permanent) deletion. What ends up being the content? It's supposed to land in the .Trash-xxxx/files/ subdir within.
    – Levente
    May 2, 2021 at 4:20
  • @Levente I did this experiment, and nothing was sent to that folder. The file was simply permanently deleted.
    – Kalcifer
    May 2, 2021 at 4:21

1 Answer 1

0

I’ve tried this out in a virtual machine and I can get the trash to work with two approaches

  1. With the NTFS partition not mounted and using the files app, go to other locations and select your NTFS disk. The files window will then show whatever is on the disk. Trash functionality then works for me.

  2. I used this mount command

    sudo mount -t ntfs -o users,uid=1000,dmask=027,fmask=137,x-gvfs-show,utf8 /dev/sdb1 NTFS/

This mounts the NTFS partition sdb1 at /home/username/NTFS Trash functionality works fine. I referred to this old answer of mine which focuses more on making the mount automatic. You can find it here. Creating Trash for shared NTFS partition

You must log in to answer this question.

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