Ubuntu: Trash can support on NTFS volumes
As Wyatt Smith said on https://answers.launchpad.net/ubuntu/+question/52985 :
To enable a trash can on a NTFS partition you will have to make an entry in your /etc/fstab file. You must specify the drive by UUID and assign a userid.
To discovery the UUID of the external drive. Please plug the drive in and then type
sudo blkidTo edit your fstab file with root permission
gksu gedit /etc/fstabHere is an example of how the entry should look. Please replace the UUID and mountpoint with the appropriate values from your system
# NTFS Partitions
UUID=19031A6158945892 /media/DATA ntfs-3g defaults,uid=1000,locale=en_US.UTF-8 0 0Save and exit.
To remount (unmount then mount) all drives listed in /etc/fstab
sudo umount -a
sudo mount -aYou should then see a hidden trash folder on your ntfs drive.
After this deletes are not permanent and they should be visible in the trash.
Thomas sanoi,
kesäkuu 23, 2009 at 11:01
It doesn’t work. I did the exact thing and I named the mountingpoint media/dev….
The device didn’t show in the place screen after unmount and remounting.
I tried to name the mount point /media/’DRIVE ID’ and then it showed in places but said that i hadn’t got the permission to mount the drive when i tried to open it.
What am I doing wong?
ssalonen sanoi,
kesäkuu 23, 2009 at 20:44
I’m not sure what’s wrong but you can try these:
In /etc/fstab do not use ‘ntfs-3g’ as filesystem (3rd column). Instead use ‘ntfs’. I have following options (4th column) in fstab:
auto,quiet,defaults,rw,gid=46,uid=1000Let’s go through the options one by one:
*uid
Uid=1000 makes the system use folder named ‘.Trash-1000′ as trash folder.
*gid
gid=46 is to make the disk “hot-pluggable”. 46 should be equal to ‘plugdev’ group id. You can find out the correct id by executing following command in the terminal:
cat /etc/groupFind out a row similar to this one:
plugdev:x:46:USERNAMEThis tells that ‘plugdev’ group has id 46 and it includes user called USERNAME. Your user should be included in the group.
* auto
auto means automatic mount on computer startup.
It’s not necessary to use uuid’s to locate drives (fstab 1st column) but I find it more reliable because uuid are unique to the drive and do not change (mountpoints like /dev/sdd1 might change on usb devices).
I haven’t found a way to mount the drives as regular user so you must mount drives using
sudo mount -acommand. It should not throw any errors.Tell me how these tricks work.
Thomas sanoi,
kesäkuu 23, 2009 at 23:34
Thank you very much. I appreciate the help very much.
Somehow i’ve got it working playing around with backups and copying and pasting.
I don’t know what it was but it works now.
Great article, i think lots of users found your tutorial useful with this extra explanation.
ssalonen sanoi,
kesäkuu 24, 2009 at 05:46
It’s great to know you got it working! Thank you for the compliments
I actually write this blog basically for my own future needs (when I’m reinstalling ubuntu perhaps) and sometimes I forget essential parts in my guides. Your comments just made this guide much better, thank you!