Posted on Leave a comment

Trash works on NTFS when mounted by Nautilus, but not when automounted via /etc/fstab

I have 2 “data” drives. One is ntfs, the other is ext4.

The Trash works for both drives when I allow Nautilus to handle the mount.

I’ve opted to auto-mount them via entries in /etc/fstab, but when I do this, only the ext4 gives me a functioning Trash directory.

Trash on the ntfs drive simply does not work.
When I press “delete” or use the context menu item “Move to Trash”, I get this error dialogue message.

Cannot move file to trash, do you want to delete immediately?
. . . . The file “test” cannot be moved to the trash . . . .

Here are my /etc/fstab lines.

/dev/sdb1 /media/D_0931_data ntfs defaults 0 0
/dev/sdc1 /media/E_0298_back ext4 defaults 0 0

… and here is how I created the mountpoint directories.

sudo mkdir /media/D_0931_data
sudo mkdir /media/E_0298_back

Everything seems to be working fine, except for the Trash on the ntfs drive…
The Trash on the ext4 drive works normally.

SOLUTION:

I believe Nautilus needs a .Trash-1000 folder in the root of the filesystem (e.g. /media/D_0931_data/.Trash-1000) to exist and be user-writeable.

NOTE: the 1000 in the .Trash-1000 is your user ID. You can get yours by id -u USERNAME. Change it accordingly if needed.

Try running this: sudo mkdir /media/D_0931_data/.Trash-1000; sudo chmod 777 /media/D_0931_data/.Trash-1000.

If that didn’t work, can you try the same but with .Trash instead of Trash-1000, and if that didn’t work, post the output of ls -la /media/D_0931_data?

Try adding this to fstab (on the ntfs line): defaults,uid=1000 instead of just defaults.

Leave a Reply