<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>186028</bug_id>
          
          <creation_ts>2007-07-20 21:19 0000</creation_ts>
          <short_desc>kde (hal) &quot;unmounted but not ejected&quot; error unless in disk group</short_desc>
          <delta_ts>2008-04-26 17:27:51 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>KDE</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>bkohler@gmail.com</reporter>
          <assigned_to>kde@gentoo.org</assigned_to>
          <cc>aronparsons@gmail.com</cc>
    
    <cc>damian01w@gmail.com</cc>
    
    <cc>esigra@gmail.com</cc>
    
    <cc>gengor@gentoo.org</cc>
    
    <cc>kyron@neuralbs.com</cc>
    
    <cc>pva@gentoo.org</cc>
    
    <cc>redroyalty@fastmail.fm</cc>
    
    <cc>roberto.castagnola@gmail.com</cc>
    
    <cc>spamtrap@hope-st.ath.cx</cc>
    
    <cc>teidakankan@gmail.com</cc>
    
    <cc>tomsimnett@yahoo.co.uk</cc>
    
    <cc>udev-bugs@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>bkohler@gmail.com</who>
            <bug_when>2007-07-20 21:19:28 0000</bug_when>
            <thetext>When I right click a usb storage device in konqueror and  go to &quot;Safely Remove&quot;, it gives me an error box stating &quot;The device was successfully unmounted, but could not be ejected&quot;.  I am in the plugdev group, and the actual mounting/unmounting works great, it just always throws this error telling me that the &apos;eject&apos; part failed.

After much searching, I&apos;ve found that adding my user to the &apos;disk&apos; group fixes the problem.  Shouldn&apos;t it be enough to just be in the plugdev group?

Reproducible: Always

Steps to Reproduce:
1. Build kde with USE=hal enabled for automounting etc.
2. Log into kde as a user belonging to &apos;plugdev&apos; group but not &apos;disk&apos; group.
3. Plug in a usb storage device and allow kde to automount it.
4. Browse to system:/media in konqueror, right click your usb device, and choose &quot;safely remove&quot;.

Actual Results:  
Error dialog stating &quot;The device was successfully unmounted, but could not be ejected&quot;.

The error dialog&apos;s title bar reads &quot;Error - kio_media_mounthelper&quot;.

Expected Results:  
Since I am already in the plugdev group, it should do the unmount/eject procedure without any extra priveleges.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>bkohler@gmail.com</who>
            <bug_when>2007-07-26 21:43:37 0000</bug_when>
            <thetext>maybe im barking up the wrong tree here.  

it works fine for cdrom because my cdrom&apos;s device node gets root:cdrom ownership and i&apos;m in the cdrom group.  i don&apos;t think i&apos;ll be able to do the same with my usb storage until i make udev give usb storage devices something like root:usbstorage ownership and put my users in that group. any thoughts on whether the &apos;disk&apos; group is really appropriate for usb storage devices?

or maybe there is a way to get kde to realize that it&apos;s stupid to try &apos;eject&apos; a usb drive, and it should skip ejecting for usb storage.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>gengor@gentoo.org</who>
            <bug_when>2007-08-30 05:10:58 0000</bug_when>
            <thetext>I can confirm hitting this bug, as are others:

http://forums.gentoo.org/viewtopic-p-4212031.html</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>niknik79@bossmail.de</who>
            <bug_when>2007-11-09 09:16:14 0000</bug_when>
            <thetext>is anyone doing something about this? the fix is straightforward, a one line udev rule as shown in the forum thread quoted by Gordon:

echo -e &apos;# removable disks\nACTION==&quot;add&quot;, SUBSYSTEM==&quot;block&quot;, KERNEL==&quot;sd[a-z][0-9]&quot;, ATTRS{removable}==&quot;1&quot;, GROUP=&quot;plugdev&quot;\n&apos; &gt;&gt; /etc/udev/rules.d/51-local.rules

why not include this in the standard udev setup?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tgurr@gentoo.org</who>
            <bug_when>2007-11-19 22:12:24 0000</bug_when>
            <thetext>CC&apos;ing udev-bugs to verify the suggestion in comment #3.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cardoe@gentoo.org</who>
            <bug_when>2007-11-19 22:28:37 0000</bug_when>
            <thetext>block devices shouldn&apos;t be owned by the plugdev group. Block devices should be owned by disk or cdrom.

it looks like KDE is directly calling &quot;eject&quot; or some similar code to &quot;eject&quot; and not using the HAL method Eject(). The issue would be mitigated if KDE used the Eject() method.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>tgurr@gentoo.org</who>
            <bug_when>2007-11-20 19:00:44 0000</bug_when>
            <thetext>*** Bug 165079 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>oblom27@rambler.ru</who>
            <bug_when>2007-11-27 09:48:17 0000</bug_when>
            <thetext>(In reply to comment #5)
&gt; block devices shouldn&apos;t be owned by the plugdev group. Block devices should be
&gt; owned by disk or cdrom.
&gt; 
&gt; it looks like KDE is directly calling &quot;eject&quot; or some similar code to &quot;eject&quot;
&gt; and not using the HAL method Eject(). The issue would be mitigated if KDE used
&gt; the Eject() method.
&gt; 

KDE calls kdeeject. It&apos;s a script that calls /usr/bin/eject.
User can&apos;t eject by permition.
It may fix by change owner or by &quot;chmod u+s /usr/bin/eject&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kyron@neuralbs.com</who>
            <bug_when>2007-11-27 17:22:28 0000</bug_when>
            <thetext>A user can eject a CD...so I don&apos;t thinks that&apos;s a fix. I believe the &quot;HAL patch&quot; in Comment #3 is more appropriate.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cardoe@gentoo.org</who>
            <bug_when>2007-11-27 17:30:14 0000</bug_when>
            <thetext>This has nothing to do with HAL. And a disk is a disk and should be owned by group disk. KDE just needs to do things right.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kyron@neuralbs.com</who>
            <bug_when>2007-11-28 01:19:49 0000</bug_when>
            <thetext>&quot;a disk is a disk and should be owned by group disk.&quot; I don&apos;t agree with that. A removable USB flash disk, of type as described in Comment #3 is definitely not the same as the SATA or PATA disk used to mount as root /. Furthermore, I don&apos;t believe it is &quot;wise&quot; to give users the &quot;disk&quot; group ownership when all one wants is to be able to remove his USB key.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kyron@neuralbs.com</who>
            <bug_when>2007-11-28 01:21:58 0000</bug_when>
            <thetext>And true, it has nothing to do with HAL forgot to agree on that point in Comment #9 ;)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>caster@gentoo.org</who>
            <bug_when>2008-02-03 21:10:04 0000</bug_when>
            <thetext>Upstream has bug about this, which seems to have been fixed year ago but probably regressed in a newer kde version - http://bugs.kde.org/show_bug.cgi?id=130427</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>julien.etienne@gmail.com</who>
            <bug_when>2008-02-19 22:18:31 0000</bug_when>
            <thetext>Created an attachment (id=144017)
kdeeject patch to use HAL to eject media

This patch fixes the issue for me.
This patch needs HAL to work, but if you have the issue you are already using HAL.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>philantrop@gentoo.org</who>
            <bug_when>2008-04-26 17:27:51 0000</bug_when>
            <thetext>Fixed in CVS.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>144017</attachid>
            <date>2008-02-19 22:18 0000</date>
            <desc>kdeeject patch to use HAL to eject media</desc>
            <filename>kdeeject.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIC91c3Iva2RlLzMuNS9iaW4va2RlZWplY3Qub3JpZwkyMDA4LTAyLTE5IDIyOjQ1OjI2LjAw
MDAwMDAwMCArMDEwMAorKysgL3Vzci9rZGUvMy41L2Jpbi9rZGVlamVjdAkyMDA4LTAyLTE5IDIy
OjU3OjI2LjAwMDAwMDAwMCArMDEwMApAQCAtMjUsNyArMjUsMTAgQEAKICAgICAgICMgV2Fybmlu
ZywgaXQgaGFzIHRvIGJlIGVpdGhlciBlamVjdCAyLjAueCBvciA+PTIuMS41CiAgICAgICAjIE90
aGVyd2lzZSBpdCBkb2Vzbid0IHdvcmsgYXMgZXhwZWN0ZWQgKGl0IHJlcXVpcmVzIGEKICAgICAg
ICMgZnN0YWIgZW50cnkgZm9yIG5vIHJlYXNvbikuCi0gICAgICBlamVjdCAkMSA+L2Rldi9udWxs
IDI+JjEKKyAgICAgICNlamVjdCAkMSA+L2Rldi9udWxsIDI+JjEKKyAgICAgIEJMT0NLX1VEST0k
KGRjb3Aga2RlZCBtZWRpYW1hbmFnZXIgcHJvcGVydGllcyAiJDEiIHwgaGVhZCAtMSkKKyAgICAg
IFsgLW4gIiRCTE9DS19VREkiIF0gfHwga2RpYWxvZyAtLXRpdGxlICJLREUgRWplY3QiIC0tZXJy
b3IgIkNhbid0IGZpbmQgVURJIGZvciBVUkwgJDEiCisgICAgICBkYnVzLXNlbmQgLS1zeXN0ZW0g
LS1kZXN0PW9yZy5mcmVlZGVza3RvcC5IYWwgIiRCTE9DS19VREkiIG9yZy5mcmVlZGVza3RvcC5I
YWwuRGV2aWNlLlZvbHVtZS5FamVjdCBhcnJheTpzdHJpbmc6IiIgPi9kZXYvbnVsbCAyPiYxCiAg
ICAgICA7OwogICBlc2FjCiAgIGlmIHRlc3QgJD8gLWVxIDA7IHRoZW4K
</data>        

          </attachment>
    </bug>

</bugzilla>