You are not logged in.
My PC has a (smallish) SSD and a (large) HDD. The SSD houses /home; I have got another data partition on the HDD which I have mounted under /mnt/althome. Deleting files with Thunar works on /home (files get moved to Trash and can be undeleted from there), but does not from /mnt/althome; Thunar responds with
Are you sure you want to permanently delete file.test?
If you delete a file, it is permanently lost
This happens when selecting both when pressing 'Delete' on the keyboard or select 'Move to wastebasket' with right-mouse-click.
Couple of items I checked:
I have an .Trash directory in the root of /mnt/althome and it has '1777' permissions; it contains a separate entry for me (I am user 1001):
>drwxrwxrwt. 5 root root 4096 May 26 20:35 /mnt/althome/.Trash
├── [drwxrwxrwt] 1001
│ ├── [drwx------] files
│ └── [drwx------] info
├── [drwxr-x---] files
└── [drwxr-x---] info
I can put files into the trash using the trash-put command as below shows for a file in /mnt/althome
> trash-put -v test
trash-put: Volume of file: /mnt/althome
trash-put: Trash-dir: /home/xxxxxxxx/.local/share/Trash from volume: /home
trash-put: Trash-dir: /mnt/althome/.Trash/1001 from volume: /mnt/althome
trash-put: 'test' trashed in /mnt/althome/.Trash/1001
Weird is that I do not find the file using the trash-list utility:
> trash-list | grep test
>
Even though it is where it should be (I am user 1001 on this PC):
> ls -log /mnt/althome/.Trash/1001/files
total 7112
.... deleted for brevity
-rw-r-----. 1 0 May 28 20:09 test
.... deleted for brevity
But Thunar does shows this file in its trash!
I have been checking permissions on the directories files and info under .Trash/1001/, but also that did not bring any changes.
Anybody out there with a similar setup (second partition to which the user has full access) with a working trashcan (move to wastebasket)? I am specifically interested in:
Where does the trashcan reside on the 2nd partition?
What is the structure of the trash and its permissions (tree -dp .Trash)
Last edited by Pindakoe (2019-06-08 10:26:38)
Offline
I found a reference to this Gnome bug report with an extensive discussion about the way trash, GVfs, GLib (etc) works, and what some of the problems are (some are similar to yours).
Perhaps it is of some interest.
Offline
Thanks. I had in the mean-time also found these. The issues appear different (files are moved to a trash-directory, but not shown in Thunar's wastebasket. My case is the opposite, i.e. files cannot be 'deleted to trash' using Thunar, yet do appear in the trash-dir if deleted from command-line (using trash-put). But, I will dig through the posts and read up on gvfs/gio to understand how this whole thing actually works. A long weekend ahead so who knows..
Offline
I think if you simply mount to /media/althome instead of /mnt/althome the issue will disappear. That's assuming I read the links correctly.
Offline
I came to same conclusion and this indeed works. It will probably remain a mystery why this was not necessary until some weeks ago, but as I cannot remember 100% when this problem appeared we'll have to live with the work-around.
Note to self: do keep a log of any changes you make of configuration (I already do this, but somehow this slipped through).
Offline
The answer -- per this: https://unix.stackexchange.com/question … fce#517282
Create a trash folder manually for your user at the root of the mount point:
say your fstab mounts an external drive to /mnt/store2 folder.
say your user uid is 1000, run as admin:
root@machine:~# cd /mnt/store2/
root@machine:/mnt/store2# mkdir -p .Trash-1000
root@machine:/mnt/store2# chown user:user .Trash-1000
root@machine:/mnt/store2# chmod ug=rwx,o= .Trash-1000
Now you are able to delete to trash just like you do it in your home folder.
Offline
I tried that and it does not work for my case.
I have a /home/mo, and a symlink to a btrfs subvolume inside. I have created the Trash folder as described, restarted Thunar, but I don't see any option to delete to trash. Do I need to restart anything?
$ ls -ald ~/data
lrwxrwxrwx 1 mo mo 17 28. Sep 2016 /home/mo/data -> /home/mo/mnt/data/
$ ls -ald ~/mnt
lrwxrwxrwx 1 mo mo 4 13. Jan 2015 /home/mo/mnt -> /mnt/
$ mount |grep data
/dev/mapper/luks-80122c56-38da-1d7f-a531-fff111709a35 on /mnt/data type btrfs (rw,noatime,nodiratime,compress-force=zstd:3,ssd,discard=async,noacl,space_cache=v2,subvolid=522,subvol=/volumes/data)
$ ls -ald /mnt/data/.Trash-4711
drwxrwx--- 1 mo mo 0 6. Feb 07:32 /mnt/data/.Trash-4711/
$ ls -aldn /mnt/data/.Trash-4711
drwxrwx--- 1 4711 4711 0 6. Feb 07:32 /mnt/data/.Trash-4711/
Gentoo-Linux
Offline
[ Generated in 0.010 seconds, 7 queries executed - Memory usage: 547.8 KiB (Peak: 548.65 KiB) ]