Trashcan support on NTFS volumes: Difference between revisions

From WickyWiki
mNo edit summary
mNo edit summary
Line 13: Line 13:


<syntaxhighlight lang=bash>
<syntaxhighlight lang=bash>
sudo blkid
blkid
</syntaxhighlight>
</syntaxhighlight>



Revision as of 06:56, 14 May 2016


To enable Trashcan 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:

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