Bug 62077 - Cannot mount external firewire hard drive or usb thumb drive as normal user, root required
Summary: Cannot mount external firewire hard drive or usb thumb drive as normal user, ...
Status: RESOLVED FIXED
Alias: None
Product: udisks
Classification: Unclassified
Component: detection (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-10 00:10 UTC by Kyle Pablo
Modified: 2013-03-19 15:08 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
udisks2 dump (24.30 KB, text/plain)
2013-03-10 03:38 UTC, Kyle Pablo
Details
udevadm (133.77 KB, text/plain)
2013-03-10 19:21 UTC, Kyle Pablo
Details
udisksctl monitor (12.51 KB, text/plain)
2013-03-19 01:15 UTC, Kyle Pablo
Details
gvfs-mount -oi (1.00 KB, text/plain)
2013-03-19 01:16 UTC, Kyle Pablo
Details
udisksctl dump (36.08 KB, text/plain)
2013-03-19 01:17 UTC, Kyle Pablo
Details
udevadm info --export-db (139.17 KB, text/plain)
2013-03-19 01:17 UTC, Kyle Pablo
Details
mountinfo (2.60 KB, text/plain)
2013-03-19 01:18 UTC, Kyle Pablo
Details

Description Kyle Pablo 2013-03-10 00:10:31 UTC
When attaching or automounting external firewire hard drive, system prompts for root password.  Device chown is set to non-root user.  F17 did not have this issue.

udisks2, not udisks.
Comment 1 Kyle Pablo 2013-03-10 03:38:58 UTC
Created attachment 76255 [details]
udisks2 dump
Comment 2 Kyle Pablo 2013-03-10 03:40:43 UTC
System is Fedora 18

udisks2-2.0.1-1.fc18.x86_64

https://bugzilla.redhat.com/show_bug.cgi?id=909010
Comment 3 David Zeuthen (not reading bugmail) 2013-03-10 19:07:05 UTC
(In reply to comment #1)
> Created attachment 76255 [details]
> udisks2 dump

For some reason udisks does not know about /dev/sdb, /dev/sdc, /dev/sdd so this is why the root password is requested. Please attach the output of the command 'udevadm info --export-db' run as root. My guess is that there's something wrong with the firewire drivers but can't tell without more information.
Comment 4 David Zeuthen (not reading bugmail) 2013-03-10 19:08:42 UTC
Also, if you're using selinux, please try putting it in permissive mode. I can't fix bugs in the selinux stuff and it tends to interact badly with things it shouldn't.
Comment 5 Kyle Pablo 2013-03-10 19:21:28 UTC
Created attachment 76287 [details]
udevadm
Comment 6 David Zeuthen (not reading bugmail) 2013-03-10 19:46:02 UTC
(In reply to comment #5)
> Created attachment 76287 [details]
> udevadm

Yeah, look at /dev/sdb, a lot of information is missing and that's why this is happening. Looking at the RH bug comment 10 - https://bugzilla.redhat.com/show_bug.cgi?id=909010#c10 - it definitely looks like selinux is interfering. Please do try with selinux in permissive mode and see if the problems go away.

It would also help if you could include debug info. From a root shell, just do

 # udisksd --no-replace

and include the error/warning messages when hotplugging the device. Thanks.
Comment 7 Kyle Pablo 2013-03-10 20:06:55 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Created attachment 76287 [details]
> > udevadm
> 
> Yeah, look at /dev/sdb, a lot of information is missing and that's why this
> is happening. Looking at the RH bug comment 10 -
> https://bugzilla.redhat.com/show_bug.cgi?id=909010#c10 - it definitely looks
> like selinux is interfering. Please do try with selinux in permissive mode
> and see if the problems go away.
> 
> It would also help if you could include debug info. From a root shell, just
> do
> 
>  # udisksd --no-replace
> 
> and include the error/warning messages when hotplugging the device. Thanks.

I don't have udisksd:

bash: udisksd: command not found
Comment 8 David Zeuthen (not reading bugmail) 2013-03-11 00:32:28 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > Created attachment 76287 [details]
> > > udevadm
> > 
> > Yeah, look at /dev/sdb, a lot of information is missing and that's why this
> > is happening. Looking at the RH bug comment 10 -
> > https://bugzilla.redhat.com/show_bug.cgi?id=909010#c10 - it definitely looks
> > like selinux is interfering. Please do try with selinux in permissive mode
> > and see if the problems go away.
> > 
> > It would also help if you could include debug info. From a root shell, just
> > do
> > 
> >  # udisksd --no-replace
> > 
> > and include the error/warning messages when hotplugging the device. Thanks.
> 
> I don't have udisksd:
> 
> bash: udisksd: command not found

It's in /usr/lib/udisks2/udisksd I think (use things like 'rpm -ql udisks2|grep udisksd' to find out in the future).

But, as I said, I'm more interested in knowing if it works in selinux permissive mode. Just run 'setenforce 0' as root and try hotplugging the device to find out.
Comment 9 David Zeuthen (not reading bugmail) 2013-03-11 18:22:30 UTC
After talking to the udev maintainer on IM, he pointed me to this bug

 https://bugzilla.redhat.com/show_bug.cgi?id=909826

which explains the problem that you're also seeing. So this is a problem with selinux, closing NOTOURBUG. In the future, before filing a bug upstream, please always try to see if the bug happens with selinux turned off. If it doesn't, the bug is with selinux or fedora. Thanks.
Comment 10 Kyle Pablo 2013-03-11 22:41:15 UTC
(In reply to comment #9)
> After talking to the udev maintainer on IM, he pointed me to this bug
> 
>  https://bugzilla.redhat.com/show_bug.cgi?id=909826
> 
> which explains the problem that you're also seeing. So this is a problem
> with selinux, closing NOTOURBUG. In the future, before filing a bug
> upstream, please always try to see if the bug happens with selinux turned
> off. If it doesn't, the bug is with selinux or fedora. Thanks.

I set selinux to permissive mode and the firewire hdd issue persists. Suggestions.  I don't get the errors from bug 909826 too.  Only that one time.  Suggestions?
Comment 11 David Zeuthen (not reading bugmail) 2013-03-11 23:29:43 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > After talking to the udev maintainer on IM, he pointed me to this bug
> > 
> >  https://bugzilla.redhat.com/show_bug.cgi?id=909826
> > 
> > which explains the problem that you're also seeing. So this is a problem
> > with selinux, closing NOTOURBUG. In the future, before filing a bug
> > upstream, please always try to see if the bug happens with selinux turned
> > off. If it doesn't, the bug is with selinux or fedora. Thanks.
> 
> I set selinux to permissive mode and the firewire hdd issue persists.
> Suggestions.  I don't get the errors from bug 909826 too.  Only that one
> time.  Suggestions?

I'm sorry permissive mode didn't fix it, sometimes selinux interferes even in permissive mode and sometimes even too when turned off completely. In this case the problem is that udev drops an uevent on the floor because libselinux returns an error. I would wait for the bugfix to selinux and systemd/udev referenced in https://bugzilla.redhat.com/show_bug.cgi?id=909826 to land and try again. 

I wish there was something I could do to help but the problem really isn't in udisks cf. https://bugzilla.redhat.com/show_bug.cgi?id=909010#c10
Comment 12 Kyle Pablo 2013-03-16 21:53:29 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > After talking to the udev maintainer on IM, he pointed me to this bug
> > > 
> > >  https://bugzilla.redhat.com/show_bug.cgi?id=909826
> > > 
> > > which explains the problem that you're also seeing. So this is a problem
> > > with selinux, closing NOTOURBUG. In the future, before filing a bug
> > > upstream, please always try to see if the bug happens with selinux turned
> > > off. If it doesn't, the bug is with selinux or fedora. Thanks.
> > 
> > I set selinux to permissive mode and the firewire hdd issue persists.
> > Suggestions.  I don't get the errors from bug 909826 too.  Only that one
> > time.  Suggestions?
> 
> I'm sorry permissive mode didn't fix it, sometimes selinux interferes even
> in permissive mode and sometimes even too when turned off completely. In
> this case the problem is that udev drops an uevent on the floor because
> libselinux returns an error. I would wait for the bugfix to selinux and
> systemd/udev referenced in
> https://bugzilla.redhat.com/show_bug.cgi?id=909826 to land and try again. 
> 
> I wish there was something I could do to help but the problem really isn't
> in udisks cf. https://bugzilla.redhat.com/show_bug.cgi?id=909010#c10

David,

The firewire issue is definitely udisks2 related.  What can be done to fix it?  The usb issue is completely separate.
Comment 13 David Zeuthen (not reading bugmail) 2013-03-17 21:15:22 UTC
(In reply to comment #12)
> The firewire issue is definitely udisks2 related.  What can be done to fix
> it?  The usb issue is completely separate.

I wouldn't be so sure that it's "definitely udisks2 related" - in fact, I think it's not. I need the output of 'udisksctl dump' [1] on a system where the selinux bug you ran into earlier has been fixed. Generally see http://www.freedesktop.org/wiki/Software/udisks for how to best report bugs and what information to include.
Comment 14 Kyle Pablo 2013-03-19 01:15:30 UTC
Created attachment 76722 [details]
udisksctl monitor
Comment 15 Kyle Pablo 2013-03-19 01:16:20 UTC
Created attachment 76723 [details]
gvfs-mount -oi
Comment 16 Kyle Pablo 2013-03-19 01:17:11 UTC
Created attachment 76724 [details]
udisksctl dump
Comment 17 Kyle Pablo 2013-03-19 01:17:56 UTC
Created attachment 76725 [details]
udevadm info --export-db
Comment 18 Kyle Pablo 2013-03-19 01:18:30 UTC
Created attachment 76726 [details]
mountinfo
Comment 19 Kyle Pablo 2013-03-19 01:21:57 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > The firewire issue is definitely udisks2 related.  What can be done to fix
> > it?  The usb issue is completely separate.
> 
> I wouldn't be so sure that it's "definitely udisks2 related" - in fact, I
> think it's not. I need the output of 'udisksctl dump' [1] on a system where
> the selinux bug you ran into earlier has been fixed. Generally see
> http://www.freedesktop.org/wiki/Software/udisks for how to best report bugs
> and what information to include.

The selinux bug has been fixed.  I followed the link guide and uploaded everything that pertained to my issue.

udisks2-2.0.1-1.fc18.x86_64
gvfs-1.14.2-3.fc18.x86_64
libatasmart-0.19-3.fc18.x86_64
Comment 20 David Zeuthen (not reading bugmail) 2013-03-19 04:40:57 UTC
(In reply to comment #16)
> Created attachment 76724 [details]
> udisksctl dump

This is very useful and immediately helped solve the problem. This patch should fix it:

http://cgit.freedesktop.org/udisks/commit/?id=b841e30a98459816dfc49a735d3db4355a88edcd

This patch will be in udisks 2.1.1. For Fedora, I would suggest asking the Fedora maintainer to include it in the relevant versions. Thanks.
Comment 21 Kyle Pablo 2013-03-19 15:08:13 UTC
(In reply to comment #20)
> (In reply to comment #16)
> > Created attachment 76724 [details]
> > udisksctl dump
> 
> This is very useful and immediately helped solve the problem. This patch
> should fix it:
> 
> http://cgit.freedesktop.org/udisks/commit/
> ?id=b841e30a98459816dfc49a735d3db4355a88edcd
> 
> This patch will be in udisks 2.1.1. For Fedora, I would suggest asking the
> Fedora maintainer to include it in the relevant versions. Thanks.

Thanks David for all your help.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.