Posts: 47
metallextrem
Joined: 07 Apr 2010
#1
Hi,
Anyone can help me? I cant unmount an USB drive, it give me this error:

Image

(the window says something like"could not unmount the device" in catalan)

Thanks!
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#2
You can unmount it as root

Code: Select all

umount /media/disk
or if you open pcmanfm as root and then unmount the drive.

It would be good to know the underlying cause for not being able to unmount as a normal user but since I usually don't use thumbdrives, when I need I just unmount it as root.
Posts: 47
metallextrem
Joined: 07 Apr 2010
#3
Its weird that I dont have premission to unmount a drive that I mounted as user. Well, I don't know, I'm really a rookie on this.
Anyway, it's good to know the terminal way (it works, of course)
Thanks!
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#4
I added a section to the plugdev section of /etc/dbus-1/system.d/hal.conf and that *seems* to have fixed the problem. Unfortunately, I didn't always get the problem even before the patch so I may be fooling myself. The added section is from my Gentoo system which does not suffer from this problem. Here is the patch:

Code: Select all

--- /etc/dbus-1/system.d/hal.conf.orig    2010-06-03 20:08:09.000000000 -0600
+++ /etc/dbus-1/system.d/hal.conf    2010-06-03 20:08:19.000000000 -0600
@@ -80,6 +80,17 @@
            send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
   </policy>
   <policy group="plugdev">
+
+    <allow send_destination="org.freedesktop.Hal"
+           send_interface="org.freedesktop.DBus.Introspectable"/>
+    <allow send_destination="org.freedesktop.Hal"
+           send_interface="org.freedesktop.DBus.Properties" />
+
+    <allow send_destination="org.freedesktop.Hal"
+           send_interface="org.freedesktop.Hal.Device"/>
+    <allow send_destination="org.freedesktop.Hal"
+           send_interface="org.freedesktop.Hal.Manager"/>
+
     <allow send_destination="org.freedesktop.Hal"
            send_interface="org.freedesktop.Hal.Device.Storage"/>
     <allow send_destination="org.freedesktop.Hal"
It looks like the authors of our file intended for everyone to have these permissions (in the"default" section) so specifically giving them to the plugdev group should not create a security problem. I've also uploaded the patched version of hal.conf for those who don't want to bother with patching.

After changing the file, you have to run the following as root to have the change take effect:

Code: Select all

# /etc/init.d/dbus restart
PLMK if this helps.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#5
That also seems to solve the intermittent problem I had with pcmanfm. (I use rox and there was no problem).
The problem only appeared on my box with sticks using fat.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#6
I think there is still a problem. When I boot antiX with usb sticks plugged into the computer then antiX mounts all the partitions on all the sticks automatically. I believe root is doing that mounting because a normal user can't unmount partitions that were mounted at boot time.

IMO, the proper solution is to turn off automounting at boot time, especially if a normal user is unable to unmount these partitions. But I don't know how to do this.
Posts: 47
metallextrem
Joined: 07 Apr 2010
#7
Thanks a lot for the interest. I am too rookie on gnu/linux in general to get the BitJam solution.

By now I finally take the suggestion from anticapitalista and use ROX-Filer (instead of terminal) to unmount USB sticks on /media/disk. I think it's the best way for me now and it just works. I don't know why PCMan fails on this...

I just suggest the AntiX team to solve this little problem in the next version of AntiX.

Thanks again!
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#8
PCManFM in the testing repos, and so in antiX, is the older version. There's already a new, re-written one that works differently and is in rapid development. By the time antiX have a next version this will be resolved or the problem will be different __{{emoticon}}__
Anyway, we can make sure we test this before the next version comes out. For antiX 8.5 this wasn't possible since this version of PCManFM wasn't being developed anymore and the new version hadn't been launched yet.
Posts: 47
metallextrem
Joined: 07 Apr 2010
#9
Thanks for the clarification secipolla. You did a great job, anyway. AntiX is the exact distro I was looking for (ultralight, powerful, stable...) so I will keep it until the next version.
Cheers! __{{emoticon}}__
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#10
Then you'll be among the ones who make sure everything is in the best shape before the launch __{{emoticon}}__
Posts: 47
metallextrem
Joined: 07 Apr 2010
#11
secipolla wrote:Then you'll be among the ones who make sure everything is in the best shape before the launch __{{emoticon}}__
Well, I will do my best if you need me... from my"rookie" user point of view __{{emoticon}}__