Trashcan support on NTFS volumes

From WickyWiki
Revision as of 07:26, 5 July 2013 by Admin (talk | contribs) (14 revisions)


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

Modify fstab

Associating a user-id with a partition can be done with an entry in the /etc/fstab file. You also need the drive's UUID, system's main 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

In this example the Trash can will be located in /media/DATA/.Trash-1000/.

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