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 blkid

To edit your fstab file with root permission

gksu gedit /etc/fstab

Here 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 0

Save and exit.

To remount (unmount then mount) all drives listed in /etc/fstab

sudo umount -a
sudo mount -a

You 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.

9 thoughts on “Ubuntu: Trash can support on NTFS volumes

  1. Thomas kirjoitti:

    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 kirjoitti:

      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=1000

      Let’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/group
      Find out a row similar to this one:
      plugdev:x:46:USERNAME

      This 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 -a command. It should not throw any errors.

      Tell me how these tricks work.

  2. Thomas kirjoitti:

    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 kirjoitti:

      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!🙂

  3. Abdullah kirjoitti:

    Thanks a heap!

    Worked a treat.

    That’s the last little bug ironed out of my new Karmic install (I think!).

  4. Otto kirjoitti:

    Thanks a lot dude!

    I still have to mount it as a root though, but now trash now works!

    thanks!

  5. alex kirjoitti:

    it works thank you.

    example from my config:
    /dev/sda7 /media/alex ntfs defaults,uid=1000,locale=en_US.UTF-8 0 0

  6. Denis kirjoitti:

    It works, after rebooting, thanks !

  7. carlos kirjoitti:

    Thank you, it works!🙂

Vastaa

Täytä tietosi alle tai klikkaa kuvaketta kirjautuaksesi sisään:

WordPress.com-logo

Olet kommentoimassa WordPress.com -tilin nimissä. Log Out / Muuta )

Twitter-kuva

Olet kommentoimassa Twitter -tilin nimissä. Log Out / Muuta )

Facebook-kuva

Olet kommentoimassa Facebook -tilin nimissä. Log Out / Muuta )

Google+ photo

Olet kommentoimassa Google+ -tilin nimissä. Log Out / Muuta )

Muodostetaan yhteyttä palveluun %s