<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>177023</bug_id>
          
          <creation_ts>2008-12-05 23:29:39 +0000</creation_ts>
          <short_desc>Support for NFS mounts in kio_trash</short_desc>
          <delta_ts>2015-09-16 22:17:48 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kio</product>
          <component>trash</component>
          <version>4.1</version>
          <rep_platform>openSUSE</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="John Beranek">john</reporter>
          <assigned_to name="David Faure">faure</assigned_to>
          <cc>afiestas</cc>
    
    <cc>arthur</cc>
    
    <cc>crgridley</cc>
    
    <cc>de.meyer.maarten</cc>
    
    <cc>jazzvoid</cc>
    
    <cc>klangga</cc>
    
    <cc>nitro</cc>
    
    <cc>peter.penz19</cc>
    
    <cc>willemw12</cc>
          
          <cf_commitlink>http://commits.kde.org/kio/a7871885046394d577eeea8fa8991d30a046545f</cf_commitlink>
          <cf_versionfixedin>5.15</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>100</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>676243</commentid>
    <comment_count>0</comment_count>
    <who name="John Beranek">john</who>
    <bug_when>2008-12-05 23:29:39 +0000</bug_when>
    <thetext>Version:            (using KDE 4.1.3)
OS:                Linux
Installed from:    SuSE RPMs

Dolphin doesn&apos;t implement the &quot;top directory&quot; section of the freedesktop.org trash specification &lt;http://www.ramendik.ru/docs/trashspec.html&gt; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>676244</commentid>
    <comment_count>1</comment_count>
    <who name="John Beranek">john</who>
    <bug_when>2008-12-05 23:33:52 +0000</bug_when>
    <thetext>Hmm, at least KDE 3 Konqueror supported this behaviour, but it seems KDE 4 Konqueror does _not_. Another bug...
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>676687</commentid>
    <comment_count>2</comment_count>
    <who name="Peter Penz">peter.penz19</who>
    <bug_when>2008-12-06 16:48:12 +0000</bug_when>
    <thetext>@David: I reassigned this issue to you, the specification mentions your name :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686448</commentid>
    <comment_count>3</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2008-12-24 20:06:10 +0000</bug_when>
    <thetext>This report doesn&apos;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&apos;re hitting Bug 178479 (seems $topdir doesn&apos;t always work, but in my tests it does, please see the infos in that bug). But there&apos;s no reason that bug would affect dolphin and not konqueror or vice-versa.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686837</commentid>
    <comment_count>4</comment_count>
    <who name="John Beranek">john</who>
    <bug_when>2008-12-25 23:35:00 +0000</bug_when>
    <thetext>Well, I wasn&apos;t suggesting KDE3 Konqueror on the same machine works, as Fedora don&apos;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&apos;ll post my details over there.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>686844</commentid>
    <comment_count>5</comment_count>
    <who name="John Beranek">john</who>
    <bug_when>2008-12-25 23:52:12 +0000</bug_when>
    <thetext>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...
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>750754</commentid>
    <comment_count>6</comment_count>
    <who name="John Beranek">john</who>
    <bug_when>2009-05-01 16:43:16 +0000</bug_when>
    <thetext>With the recent activity in this bug, it should be noted that Bug 178479 concluded that the remaining issue was in kio_trash&apos;s use of _HAL_, and that HAL doesn&apos;t handle LVM volumes.

http://bugs.freedesktop.org/show_bug.cgi?id=6427</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264319</commentid>
    <comment_count>7</comment_count>
    <who name="Maarten De Meyer">de.meyer.maarten</who>
    <bug_when>2012-06-10 19:34:13 +0000</bug_when>
    <thetext>(In reply to comment #6)
So this bug is fixed and can be closed now?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1264325</commentid>
    <comment_count>8</comment_count>
    <who name="Jared B.">nitro</who>
    <bug_when>2012-06-10 19:48:02 +0000</bug_when>
    <thetext>No, it&apos;s not fixed.  Dolphin still (incorrectly) moves files deleted from a network share to ~/.local/share/.Trash rather than /path/to/share/.Trash-1000/.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1323759</commentid>
    <comment_count>9</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2012-12-14 15:57:48 +0000</bug_when>
    <thetext>There&apos;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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1363034</commentid>
    <comment_count>10</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2013-04-22 09:31:49 +0000</bug_when>
    <thetext>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...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1363875</commentid>
    <comment_count>11</comment_count>
    <who name="Alex Fiestas">afiestas</who>
    <bug_when>2013-04-25 14:42:14 +0000</bug_when>
    <thetext>I don&apos;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 &quot;fstab&quot; 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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1391660</commentid>
    <comment_count>12</comment_count>
    <who name="">klangga</who>
    <bug_when>2013-08-21 23:21:03 +0000</bug_when>
    <thetext>*** This bug has been confirmed by popular vote. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1391661</commentid>
    <comment_count>13</comment_count>
    <who name="">klangga</who>
    <bug_when>2013-08-21 23:23:19 +0000</bug_when>
    <thetext>Here&apos;s mine. Hope this helps.

$ solid-hardware list
udi = &apos;/org/kde/solid/udev/sys/devices/LNXSYSTM:00/LNXCPU:00&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/LNXSYSTM:00/LNXCPU:01&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/hwC0D0&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/pcmC0D0c&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/pcmC0D0p&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1b.0/sound/card0/controlC0&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/net/eth0&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/wlan0&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS0&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS1&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS2&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/platform/serial8250/tty/ttyS3&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/virtual/net/lo&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/virtual/sound/seq&apos;
udi = &apos;/org/kde/solid/udev/sys/devices/virtual/sound/timer&apos;
udi = &apos;/org/freedesktop/UDisks&apos;
udi = &apos;/org/freedesktop/UDisks/devices/sda&apos;
udi = &apos;/org/freedesktop/UDisks/devices/sdb&apos;
udi = &apos;/org/freedesktop/UDisks/devices/sda2&apos;
udi = &apos;/org/freedesktop/UDisks/devices/sda1&apos;
udi = &apos;/org/freedesktop/UDisks/devices/sda3&apos;
udi = &apos;/org/freedesktop/UPower&apos;
udi = &apos;/org/freedesktop/UPower/devices/line_power_ADP1&apos;
udi = &apos;/org/freedesktop/UPower/devices/battery_BAT1&apos;
udi = &apos;/org/kde/fstab&apos;
udi = &apos;/org/kde/fstab///ERDA/media&apos;

$ solid-hardware details /org/kde/fstab
udi = &apos;/org/kde/fstab&apos;
  parent = &apos;&apos;  (string)
  vendor = &apos;KDE&apos;  (string)
  product = &apos;Network Shares&apos;  (string)
  description = &apos;NFS and SMB shares declared in your system&apos;  (string)

$ solid-hardware details /org/kde/fstab///ERDA/media
udi = &apos;/org/kde/fstab///ERDA/media&apos;
  parent = &apos;/org/kde/fstab&apos;  (string)
  vendor = &apos;media&apos;  (string)
  product = &apos;//ERDA&apos;  (string)
  description = &apos;media on //ERDA&apos;  (string)
  StorageAccess.accessible = true  (bool)
  StorageAccess.filePath = &apos;/storage/media&apos;  (string)
  StorageAccess.ignored = false  (bool)
  NetworkShare.type = &apos;Cifs&apos;  (0x2)  (enum)
  NetworkShare.url = &apos;smb://erda/media&apos;  (string)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422808</commentid>
    <comment_count>14</comment_count>
    <who name="Valerii Malov">jazzvoid</who>
    <bug_when>2014-01-05 10:55:34 +0000</bug_when>
    <thetext>This problem affects bind mounts as well. Maybe Solid is not the most suitable solution here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1427242</commentid>
    <comment_count>15</comment_count>
    <who name="Carl Gridley">crgridley</who>
    <bug_when>2014-01-27 19:08:15 +0000</bug_when>
    <thetext>This affects my ZFS volume too. 

Took me a minute to figure out why deletes were so slow :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1544511</commentid>
    <comment_count>16</comment_count>
    <who name="David Faure">faure</who>
    <bug_when>2015-09-16 22:17:48 +0000</bug_when>
    <thetext>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 &apos;master&apos;.

Add support for network shares in kio_trash

kio_trash didn&apos;t support network shares, causing &quot;trashed&quot; files to be copied into user&apos;s home directory.

This patch adds support for them by assigning them persistent ID&apos;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&apos;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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>