You are not logged in.
I'm using Thunar, and on a separate partition, mounted to /mnt/vault, trash doesn't work. I get the pop up: "Are you sure that you want to permanently delete file? If you delete a ffile, it is permanently lost."
# fdisk -l
Device Start End Sectors Size Type
/dev/nvme1n1p1 2048 1050623 1048576 512M EFI System /boot/efi)
/dev/nvme1n1p2 1050624 3147775 2097152 1G Linux filesystem /boot)
/dev/nvme1n1p3 3147776 488397134 485249359 231.4G Linux filesystem cryptsetup root, formatted btrfs
$ mount
/dev/mapper/luks-dc2c470e-ec77-43df-bbe8-110c678785c2 on / type btrfs (rw,relatime,compress=lzo,ssd,discard,space_cache,subvolid=266,subvol=/arch)
/dev/mapper/luks-dc2c470e-ec77-43df-bbe8-110c678785c2 on /mnt/vault type btrfs (rw,relatime,compress=lzo,ssd,discard,space_cache,subvolid=268,subvol=/vault)
$ ls -l /mnt
drwxr-xr-x 1 jwhendy jwhendy 114 Jul 31 14:02 vault
$ ls -la /mnt/vault
drwxrwxrwt 1 jwhendy jwhendy 34 Jul 31 13:52 .Trash-1000
$ id
uid=1000(jwhendy) gid=1000(jwhendy) groups=1000(jwhendy),54(lock),973(realtime),987(uucp),991(lp),993(input),995(audio),998(wheel)
$ pacman -Ss gvfs
extra/gvfs 1.40.2-1 (gnome) [installed]
Virtual filesystem implementation for GIO
Trash works from anything inside ~/, but does not work on /mnt/vault. I'd like to fix this.
This post gets cited in other inquiries, with the resolution being:
- Uncheck "Erase files on removable media instead of 'trash can' creation" [I do not see this option in Thunar]
- Unmount the partition from /run/media/username and instead mount it in /mnt [mine is already mounted there]
In addition, I just tried pcmanfm and do not have this trash can option checked (it should use the trash can) and still get this error.
This post also comes up in my searches and resolves with just having a /topdir/.Trash-uid directory with write permissions. My default was .Trash-1000 and 755 permissions, but I ran across this post suggesting a $topdir/.Trash having the sticky bit set, so I went all out above on 1777 permissions, as well as trying to .Trash and .Trash-1000. Nothing has worked thus far. I typically have ~/vault symlinked to /mnt/vault, but removed that due to mentions that this might not work if it's a symlink.
Lastly, I also tried removing /mnt/vault/.Trash-1000 and just outright copying ~/.Trash-1000 to /mnt/vault since that directory works, and I'm getting the same behavior.
Any suggestions on how to better understand what's going on?
Offline
This is all correct information, but you might be missing the part that relates to the physical root directory of the mounted filesystem - at least that caused my issues with it last time. Check that using
ls -ld /mnt/vault
Also do not only check the permissions but also the user/group.
Offline
@Smoerrebroed: thanks for the suggestion! Back from vacation and remembered to check this. Does this look reasonable?
$ ls -ld /mnt/vault/
drwxr-xr-x 1 jwhendy jwhendy 114 Jul 31 14:02 /mnt/vault/
And just in case, since I re-created my symlink to ~/vault:
$ ls -ld ~/vault/
drwxr-xr-x 1 jwhendy jwhendy 114 Jul 31 14:02 /home/jwhendy/vault/
Anything else you'd suggest checking?
Offline
...
$ ls -ld ~/vault/ drwxr-xr-x 1 jwhendy jwhendy 114 Jul 31 14:02 /home/jwhendy/vault/
...
Don't know about your trash problem but that's not a symbolic link your showing, this would be
drwxr-xr-x 1 jwhendy jwhendy 114 Jul 31 14:02 /home/jwhendy/vault -> /mnt/vault
Incomplete copy or?
Offline
@qinohe: interesting catch, and I missed that, though my main point was to show ownership and permissions of the symlink, not to prove it was a symlink. It was a full copy/paste, but I inadvertently included a trailing slash.
$ ls -ld ~/vault/
drwxr-xr-x 1 jwhendy jwhendy 114 Jul 31 14:02 /home/jwhendy/vault/
$ ls -ld ~/vault
lrwxrwxrwx 1 jwhendy jwhendy 11 Jul 31 14:43 /home/jwhendy/vault -> /mnt/vault
Offline
and I missed 'd' instead of 'l', yes permissions of that second link does indeed look correct.
edit: for completeness sake I tried the same ; thunar, a soft linked mapper device from /mnt to ~/ , deleting a file ends up in the trashcan.
I have no clue how to troubleshoot this further than this..
Last edited by qinohe (2019-08-29 22:50:42)
Offline
@qinohe: So you tried something like:
$ sudo mkdir /mnt/trashtest
$ sudo chown yourusername:yourusername /mnt/trashtest
$ touch /mnt/trashtest/foo.txt
Then go into Thunar and delete that file?
I'm puzzled as well... just created a bug upstream to see if the XFCE team has suggestions.
Offline
Yes, exactly that's what I did including the mapper device which are on my NAS, also tried it with a local volume. The only difference I see is I'm using i3...
Offline
I'm also using i3 We'll see what XFCE says! Thanks for the clarification.
Offline
Could you try to recreate your Trash
mkdir -m 700 -p ~/.local/Trash/{expunged,files,info}
That's what mine looks like.
edit:
Same for the trash on your mapper device:
mkdir -m 700 -p ~/trashstest/.Trash-1000/{expunged,files,info}
Last edited by qinohe (2019-09-03 15:53:05)
Offline
I made it directly on the share after deleting the one that was there. Not working
$ ls -ld /mnt/vault/.Trash-1000
drwxr-xr-x 1 jwhendy jwhendy 34 Sep 3 12:00 /mnt/vault/.Trash-1000
$ ls -ld /mnt/vault/.Trash-1000/*
drwx------ 1 jwhendy jwhendy 0 Sep 3 12:00 /mnt/vault/.Trash-1000/expunged
drwx------ 1 jwhendy jwhendy 0 Sep 3 12:00 /mnt/vault/.Trash-1000/files
drwx------ 1 jwhendy jwhendy 0 Sep 3 12:00 /mnt/vault/.Trash-1000/info
I wish there was a direct call for deleting via thunar. Then maybe I could see the output directly? When trying with pcmanfm, it also fails. I get the error "Some files cannot be moved to trash can because the underlying file systems don't support this operation.
Do you want to delete them instead?"
I wondered about btrfs, and re-found a thread I forgot even existed and shows I've had this problem for a long time. Other notable things from that thread:
- ~/.Trash-1000 exists for me, but isn't actually used. My real trash is ~/.local/share/Trash
- dolphin still works, and deleting a file from /mnt/vault ends up in ~/.local/share/Trash
Offline
As a sanity check could you create a new user with it's own home dir. and try the same in that account?
There may be something wrong with your own home dir.
If that's the case you have a point from where you can start investigating, if not my ideas are up.
Offline
Update: a reply on the XFCE bug led me to a reddit post, which led me to file this glib bug report.
@qinohe: the code identified in the reddit post is this, which calls a function to see if the mount point is internal. I thought this was preventing anything in /mnt from working, but now I think it's only that directory specifically, not /mnt/foo.
I tried remounting my vault subvol to ~/vault directly (vs symlink to /mnt/vault) and that still isn't working, so now I'm really perplexed!
Anyway, I'll just be following along with the bugs above now as I think this is upstream.
Offline