Trashcan support on NTFS volumes

From WickyWiki
Revision as of 21:19, 12 January 2012 by Wilbert (talk | contribs)


To enable Trash can support on an NTFS partition you need to associate an user-id with that partition.

Modify fstab

Associating a user-id with a partition can be done with an entry in the /etc/fstab file. You need the drive's UUID and an user-id, system's first user-id usually is 1000.

To find the correct UUID:

sudo blkid

Returns:

...
/dev/sda2: LABEL="Ubuntu" UUID="12312312312312312" TYPE="ext4" 
/dev/sda3: LABEL="Data" UUID="45645645645645645" TYPE="ntfs" 
...

Now edit fstab:

sudo gedit /etc/fstab

Add the following line:

...
UUID=45645645645645645   /media/DATA   ntfs-3g   defaults,uid=1000,locale=en_US.UTF-8   0   0
...

When you followed the instructions the partition will be mounted after you start your machine. When you don't want that you should add 'noauto' as follows:

...
UUID=45645645645645645   /media/DATA   ntfs-3g   defaults,noauto,uid=1000,locale=en_US.UTF-8   0   0
...

Now remount the partitions.

sudo umount -a
sudo mount -a

Mount manually

You can also use the same options when manually mounting:

sudo mkdir /media/DATA
sudo mount /dev/sda3 /media/DATA -o defaults,noauto,uid=1000,locale=en_US.UTF-8