Version: (using KDE 4.1.3) OS: Linux Installed from: SuSE RPMs Dolphin doesn't implement the "top directory" section of the freedesktop.org trash specification <http://www.ramendik.ru/docs/trashspec.html> which specifies a cross-desktop way to safely trash files in an environment where some filesystems are local and some are not. This can create large problems in environments where home directories are central NFS (or other network file system) provided. A user then deletes gigabytes of data from their local filesystem, and this data is all moved to the networked home directory, quite possibly taking said user over quota. Konqueror supports this behaviour, so this is a loss of functionality for people that may swap to using Dolphin from Konqueror.
Hmm, at least KDE 3 Konqueror supported this behaviour, but it seems KDE 4 Konqueror does _not_. Another bug...
@David: I reassigned this issue to you, the specification mentions your name :-)
This report doesn't make much sense to me. KDE3 konqueror, KDE4 konqueror, and KDE4 dolphin, all share the same code for trashing files, called kio_trash. There is definitely no loss of behavior when switching between konqueror and dolphin, when it comes to trashing, the exact same code is being used. Where you simply confused by Del vs Shift+Del shortcuts maybe? Or maybe you're hitting Bug 178479 (seems $topdir doesn't always work, but in my tests it does, please see the infos in that bug). But there's no reason that bug would affect dolphin and not konqueror or vice-versa.
Well, I wasn't suggesting KDE3 Konqueror on the same machine works, as Fedora don't offer a choice between KDE3 and KDE4 from Fedora 9 onwards. I only know with previous KDE 3 versions on earlier Fedora releases trashing to $topdirs worked correctly and now it does not. Permissions should not be an issue: $ ls -ld /.Trash drwxrwxrwt 3 root root 4.0K 2008-07-09 10:55 /.Trash/ $ ls -ld / drwxr-xr-x 32 root root 4.0K 2008-12-10 15:18 // If I delete a file on the / partition, it is moved to $HOME/.local/share/Trash, which is an NFS mounted home directory. Bug 178479 does look pertinent, maybe I'll post my details over there.
However, on my openSUSE 11.1 box that does have both KDE3 and KDE4 konqueror, both konquerors do show the fault: $ rpm -qf /opt/kde3/lib/kde3/kio_trash.so kdebase3-runtime-3.5.10-17.4 $ rpm -qf /usr/lib/kde4/kio_trash.so kdebase4-runtime-4.1.3-4.1 The kio_trash libraries look to be completely different...
With the recent activity in this bug, it should be noted that Bug 178479 concluded that the remaining issue was in kio_trash's use of _HAL_, and that HAL doesn't handle LVM volumes. http://bugs.freedesktop.org/show_bug.cgi?id=6427
(In reply to comment #6) So this bug is fixed and can be closed now?
No, it's not fixed. Dolphin still (incorrectly) moves files deleted from a network share to ~/.local/share/.Trash rather than /path/to/share/.Trash-1000/.
There's definitely code for using such per-partition trash dirs, but I think the problem is that we use Solid to find the device associated with the partition (in order to use the device major+minor numbers as identifier for the partition), and this probably fails for NFS mounts. I'm not sure which identifier to use for those, though. If anyone feels like writing a patch for this issue, see idForDevice() in kde-runtime/kioslave/trash/trashimpl.cpp, and the callers to that method (which use Solid::Device::listFromQuery). I *think* solid returns nfs mounts these days, but maybe not with the query used in this code, or if it does, then the issue is that idForDevice() returns -1 for NFS mounts.
Alex, this is the issue we discussed. Any numeric identifier we could use for a NFS mount? Otherwise I guess we could generate them on demand and store them in a config file so that all instances of kio_trash share the same identifier for the nfs mount...
I don't have any nfs/samba share to test this right now, for those who have, can you execute: solid-hardware list then look at the returned list, when you see something that contains "fstab" execute: solid-hardware details /fstab/.... That should show if we have any int we can use to identify the mount. @david, do we have to use ints for this?
*** This bug has been confirmed by popular vote. ***
Here's mine. Hope this helps. $ solid-hardware list udi = '/org/kde/solid/udev/sys/devices/LNXSYSTM:00/LNXCPU:00' udi = '/org/kde/solid/udev/sys/devices/LNXSYSTM:00/LNXCPU:01' udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0' udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/pcmC0D0c' udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/pcmC0D0p' udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/controlC0' udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/net/eth0' udi = '/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/wlan0' udi = '/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS0' udi = '/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS1' udi = '/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS2' udi = '/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS3' udi = '/org/kde/solid/udev/sys/devices/virtual/net/lo' udi = '/org/kde/solid/udev/sys/devices/virtual/sound/seq' udi = '/org/kde/solid/udev/sys/devices/virtual/sound/timer' udi = '/org/freedesktop/UDisks' udi = '/org/freedesktop/UDisks/devices/sda' udi = '/org/freedesktop/UDisks/devices/sdb' udi = '/org/freedesktop/UDisks/devices/sda2' udi = '/org/freedesktop/UDisks/devices/sda1' udi = '/org/freedesktop/UDisks/devices/sda3' udi = '/org/freedesktop/UPower' udi = '/org/freedesktop/UPower/devices/line_power_ADP1' udi = '/org/freedesktop/UPower/devices/battery_BAT1' udi = '/org/kde/fstab' udi = '/org/kde/fstab///ERDA/media' $ solid-hardware details /org/kde/fstab udi = '/org/kde/fstab' parent = '' (string) vendor = 'KDE' (string) product = 'Network Shares' (string) description = 'NFS and SMB shares declared in your system' (string) $ solid-hardware details /org/kde/fstab///ERDA/media udi = '/org/kde/fstab///ERDA/media' parent = '/org/kde/fstab' (string) vendor = 'media' (string) product = '//ERDA' (string) description = 'media on //ERDA' (string) StorageAccess.accessible = true (bool) StorageAccess.filePath = '/storage/media' (string) StorageAccess.ignored = false (bool) NetworkShare.type = 'Cifs' (0x2) (enum) NetworkShare.url = 'smb://erda/media' (string)
This problem affects bind mounts as well. Maybe Solid is not the most suitable solution here?
This affects my ZFS volume too. Took me a minute to figure out why deletes were so slow :-)
Git commit a7871885046394d577eeea8fa8991d30a046545f by David Faure, on behalf of Bartosz Sławianowski. Committed on 16/09/2015 at 22:16. Pushed by dfaure into branch 'master'. Add support for network shares in kio_trash kio_trash didn't support network shares, causing "trashed" files to be copied into user's home directory. This patch adds support for them by assigning them persistent ID's (because there is no device minor/major ID or any other integer we can use) which are stored in trashrc config file - because we need to share them between possible multiple kio_trash processes. Network shares get ID's starting with 6000000 to avoid possible conflicts with block devices. NextID is also stored in trashrc file. Change-Id: I5ad180d024fa61f026509435741d9967d97884c2 REVIEW: 125214 FIXED-IN: 5.15 M +32 -2 src/ioslaves/trash/trashimpl.cpp M +7 -1 src/ioslaves/trash/trashimpl.h http://commits.kde.org/kio/a7871885046394d577eeea8fa8991d30a046545f