[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What prevents mounting of USB devices?



On Sun, Apr 11, 2010 at 14:57:01 +0200, Clive McBarton wrote:
> Florian Kulzer wrote:
> > On Sat, Apr 10, 2010 at 19:20:42 +0200, Clive McBarton wrote:
> >> I run KDE and normally mount usb devices with the "Storage Media" applet
> >> in the task bar. Recently I have been getting strange errors and
> >> mounting failed:
> > 
> > Which version of KDE, 3.x or 4.x? (I don't remember a task bar applet
> > for mounting removable media from my KDE 3.x days - I always triggered
> > mounting via the icons that appeared on the desktop for removable media
> > - but I might simply not know about alternatives.)
> 
> 3.x, Lenny default. Probably 3.5.10 if I see correctly. The task bar
> applet is called "Storage Media" or "Media Applet". The right-click
> options in the taskbar are "Move Storage Media", "Remove Storage Media",
> "Configure Storage Media", "About Storage Media". When I bring up its
> preferences it has different ideas about its name and now says "Media
> Applet Preferences - KDE Panel". The "About" says "using KDE 3.5.10".

Did you have any security upgrades lately or did you install packages
from backports or volatile, or any non-Debian stuff? I am surprised that
a stable system should exhibit such a sudden regression.

Another thing to try is to activate the desktop icons for removable
devices and test if users can mount the devices by clicking on the
icons.

> > Mounting worked for you earlier, so I assume that your users are all
> > members of the "plugdev" group already. 
> 
> Yes they are.
> 
> > I would like to see the output of:
> > 
> >   awk '/<policy group="plugdev">/,/<\/policy>/' /etc/dbus-1/system.d/hal.conf
> 
> Here:
> 
>   <policy group="plugdev">
>     <allow send_interface="org.freedesktop.Hal.Device.Volume"
>            send_destination="org.freedesktop.Hal"/>
>     <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"
>            send_destination="org.freedesktop.Hal"/>
>   </policy>
> 
> By looking at the modify time, I see that this file has not been
> modified since I installed Debian, so it must still be in the default state.

AFAIK, that is exactly how it should be for Lenny, so all members of the
plugdev group should be able to send dbus messages to hal. Absence of
such permissions is a very common reason for point-click mounting to go
wrong, but that does not seem to be the case for you.

[...]

> >> And the UUID of the usb stick is even listed in /etc/fstab so that it is
> >> supposed to mount automatically when plugged in (though that does not
> >> seem to work). But that may be an unrelated issue.
> > 
> > AFAIK, you should not have any entries in fstab for removable devices
> > that you want to be handled by KDE/Gnome/whatever_other_DE via the
> > dbus/hal mechanism. In any case, I would avoid trying to mix different
> > approaches.
> 
> I would avoid that too, if any single one of them would work, but
> neither did. I did not try pmount so far, that would actually have worked.

I suspect that the fstab entry is not really a problem. Maybe you can
setup pmount for the individual users so that it is more convenient.

Unfortunately I do not understand what else your dbus error message is
trying to tell us. I would run "lshal --monitor", then plug in a USB
stick and try to mount it; maybe that will turn up something useful.

Seeing what hal knows about a USB stick might also help; hal can be
queried like this:

lshal -u $(hal-find-by-property --key block.device --string "/dev/sdX")
lshal -u $(hal-find-by-property --key block.device --string "/dev/sdX1")

(Replace "sdX" as is appropriate)

-- 
Regards,            |
          Florian   |


Reply to: