Mounted partition - Cannot move file to trash do you want to delete immediately fix

In Debian 8.3 I found that I could not move files on an fstab auto mounted ext4 partition to trash. Every time I tried I got this kind of question:

Cannot move file to trash. Do you want to delete immediately?

I followed this thread:
https://bbs.archlinux.org/viewtopic.php?id=175468

The solution was to create a folder named .Trash-1000 in the root directory of the mounted partition and make the owner of it the same user as the one logged in.

sudo mkdir /path/to/partition/.Trash-1000
sudo chown yourusername:yourusername /path/to/partition/.Trash-1000

After this I could directly move files to trash.

I tried the same on a NTFS partition, also mounted by fstab. I found out I needed to add uid=1000 to the mount options, to make the files by default owned by the same user as the one logged in, like this line in fstab:

UUID=your-uuid-here                         /your/mount/point    ntfs    users,umask=000,uid=1000,gid=users,user,exec,nofail     0       0

After creating a .Trash-1000 folder and then remounting the partition as above I could move files to trash on the NTFS partition.

This is a personal note. Last updated: 2016-04-09 02:07:35.



GitHub

My

GitLab

My

LinkedIn

My

Klebe.se

Don't forget to pay my friend a visit too. Joakim