Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-05-28 18:24:35

Pindakoe
Member
From: NL
Registered: 2003-11-26
Posts: 116

[SOLVED] Thunar cannot trash files on other partition than /home

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

#2 2019-06-07 07:05:04

alcornoqui
Member
Registered: 2014-07-28
Posts: 832

Re: [SOLVED] Thunar cannot trash files on other partition than /home

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

#3 2019-06-07 17:15:58

Pindakoe
Member
From: NL
Registered: 2003-11-26
Posts: 116

Re: [SOLVED] Thunar cannot trash files on other partition than /home

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

#4 2019-06-07 18:04:02

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: [SOLVED] Thunar cannot trash files on other partition than /home

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

#5 2019-06-08 10:26:15

Pindakoe
Member
From: NL
Registered: 2003-11-26
Posts: 116

Re: [SOLVED] Thunar cannot trash files on other partition than /home

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

#6 2023-11-22 22:05:48

ssq
Member
Registered: 2022-08-07
Posts: 3

Re: [SOLVED] Thunar cannot trash files on other partition than /home

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

#7 2024-02-06 06:42:19

Mo_B
Member
From: Germany
Registered: 2016-03-04
Posts: 46

Re: [SOLVED] Thunar cannot trash files on other partition than /home

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

Board footer

Powered by FluxBB