Authentication always required to unmount media

Bug #417964 reported by Brian Rogers
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
obsolete
Fix Released
Medium
devicekit-disks (Ubuntu)
Fix Released
High
Martin Pitt
Karmic
Fix Released
High
Martin Pitt

Bug Description

Binary package hint: devicekit-disks

On Karmic, after I insert a disc and it automounts, the eject button on the drive doesn't work. If I eject through Nautilus, I am prompted for my password with the following message:

Authentication is required to umount devices mounted by another user
An application is attempting to perform an action that requires privileges. Authentication is required to perform this action.

Password: ____

And under details:

Drive: Slimtype DVD A DS8A1P (CX12)
Device: /dev/sr0
Action: org.freedesktop.devicekit.disks.filesystem-unmount-others
Vendor: The DeviceKit Project

After supplying my password, the disc ejects.

I see two things going wrong here. First, it thinks somebody else mounted the disc, but I was the only one logged in when I inserted the disc. Second, it refers to org.freedesktop.devicekit, which does not exist in the Authorizations control panel, so I can't grant that privilege to everyone automatically.

devicekit-disks versions 005-0ubuntu7 and 006-0ubuntu1 are both affected.

Revision history for this message
In , Zeuthen (zeuthen) wrote :

Really need more detail than this - in general please include the information requested here

 http://www.freedesktop.org/wiki/Software/DeviceKit-disks

Anyway, it sounds to me like the device is mounted by something else than DeviceKit-disks - maybe HAL via gnome-mount. The /etc/mtab should provide a clue.

Closing as INVALID until more information is provided. Please reopen if it is still an issue. Thanks.

Revision history for this message
In , Sebastien Bacher (seb128) wrote :

The issue is still there:
- run GNOME without nautilus running so there is no automounting
- insert the CD
- run "mount | grep cd" -> nothing
- run "devkit-disks --mount /dev/sr0"
- run "mount | grep cd" -> "/dev/sr0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,user=usename" where "username" is the user who ran the command
- run "devkit-disks --dump >log", log coming
- run "devkit-disks --unmount /dev/sr0"

you get asked for a password to unmount the disk there

Revision history for this message
In , Sebastien Bacher (seb128) wrote :

Created an attachment (id=28712)
The log for the cdrom device

Revision history for this message
In , Zeuthen (zeuthen) wrote :

(In reply to comment #2)
> The issue is still there:
> - run GNOME without nautilus running so there is no automounting
> - insert the CD
> - run "mount | grep cd" -> nothing
> - run "devkit-disks --mount /dev/sr0"
> - run "mount | grep cd" -> "/dev/sr0 on /media/cdrom0 type iso9660
> (ro,nosuid,nodev,user=usename" where "username" is the user who ran the command

Please attach the output of 'cat /etc/mtab' and 'sudo cat /var/lib/DeviceKit-disks/mtab' after doing this.

The relevant line from /etc/mtab should look like this

 /dev/sr1 /media/Setup iso9660 ro,nosuid,nodev,uhelper=devkit,uid=500,gid=500,iocharset=utf8,mode=0400,dmode=0500 0 0

and the relevant like from the latter like this

 %2Fdev%2Fsr1 %2Fmedia%2FSetup 500 1

It looks like something is wrong because it should definitely include 'uhelper=devkit'.

> - run "devkit-disks --dump >log", log coming
> - run "devkit-disks --unmount /dev/sr0"
>
> you get asked for a password to unmount the disk there

This doesn't happen on my machine - it just works here. What version of DeviceKit-disks are you running?

Revision history for this message
In , Zeuthen (zeuthen) wrote :

Ah, wait a minute. Sounds like the cdrom device is in /etc/fstab. Please include the output of 'cat /etc/fstab' as well. Thanks.

Revision history for this message
In , Zeuthen (zeuthen) wrote :

With this setup I get a polkit authentication dialog when trying to unmount the device - it says "Authentication is required to unmount devices mounted by another user". Is it the same dialog you are getting?

(Alos, in the future please include either a screenshot or the text from the dialog - makes it easier to figure out what is going wrong)

Revision history for this message
In , Sebastien Bacher (seb128) wrote :

there is a "/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec 0 0" lines in the fstab configuration

> With this setup I get a polkit authentication dialog when trying to unmount the
device - it says "Authentication is required to unmount devices mounted by
another user". Is it the same dialog you are getting?

Yes that's the same dialog there

> (Alos, in the future please include either a screenshot or the text from the
dialog - makes it easier to figure out what is going wrong)

ok, sorry about that will do it for the next bug

Revision history for this message
In , Zeuthen (zeuthen) wrote :
Revision history for this message
Brian Rogers (brian-rogers) wrote :

Binary package hint: devicekit-disks

On Karmic, after I insert a disc and it automounts, the eject button on the drive doesn't work. If I eject through Nautilus, I am prompted for my password with the following message:

Authentication is required to umount devices mounted by another user
An application is attempting to perform an action that requires privileges. Authentication is required to perform this action.

Password: ____

And under details:

Drive: Slimtype DVD A DS8A1P (CX12)
Device: /dev/sr0
Action: org.freedesktop.devicekit.disks.filesystem-unmount-others
Vendor: The DeviceKit Project

After supplying my password, the disc ejects.

I see two things going wrong here. First, it thinks somebody else mounted the disc, but I was the only one logged in when I inserted the disc. Second, it refers to org.freedesktop.devicekit, which does not exist in the Authorizations control panel, so I can't grant that privilege to everyone automatically.

devicekit-disks versions 005-0ubuntu7 and 006-0ubuntu1 are both affected.

Revision history for this message
Miloš Mandarić (mandzo18) wrote :

There are at least 6 duplicates of this bug, I'm not sure where to comment.
I tried first to add myself to Explicit Authorizations to org.freedesktop.devicekit.disks.filesystem-unmount-others, that didn't work.
Running 'eject' in terminal works! Doesn't ask for password.

Revision history for this message
Brian Rogers (brian-rogers) wrote :

It looks like the files in /usr/share/polkit-1/actions need to be in /usr/share/PolicyKit/policy to show up in the Authorizations control panel. I wonder if the /usr/share/polkit-1 location is obsolete. There are other packages that put files there...

Additionally, it doesn't like the lines containing "<allow_active>auth_admin_keep</allow_active>". I had to comment out those lines to get the stuff in that file to show up. I enabled all users to unmount other filesystems, and I now get a different error: "Failed to eject media; one or more volumes on the media are busy".

Revision history for this message
Bryce Harrington (bryce) wrote :

I am able to trivially and reliably reproduce this issue on a Dell Inspiron 1420n laptop. The 'eject' command line tool works fine, but 'Eject' in nautilus prompts for the administrator password, with the message indicated in the description.

Changed in devicekit-disks (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

[This bug needs to at least be reviewed before release, so setting a milestone for it.]

Changed in devicekit-disks (Ubuntu):
milestone: none → karmic-alpha-6
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could be the bug fixed in http://cgit.freedesktop.org/DeviceKit/DeviceKit-disks/commit/?id=e57f8698b52a9eaf5c848b5f5e27af3eee80b7b9 which happens when you have fstab lines for cd drives

Revision history for this message
Bryce Harrington (bryce) wrote :

Indeed I do have an fstab line for cdroms.

This hardware is a Dell laptop that had ubuntu pre-installed, and I've just upgraded each release since.

Revision history for this message
Martin Pitt (pitti) wrote :

Can reproduce, will test the fix.

Changed in devicekit-disks (Ubuntu Karmic):
assignee: nobody → Martin Pitt (pitti)
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package devicekit-disks - 006-0ubuntu3

---------------
devicekit-disks (006-0ubuntu3) karmic; urgency=low

  * Add 00git_fstab_unmount.patch: Cherrypick upstream change which fixes
    unmounting of CD-ROMs if /etc/fstab controls the drive. (LP: #417964)

 -- Martin Pitt <email address hidden> Thu, 27 Aug 2009 16:56:47 +0200

Changed in devicekit-disks (Ubuntu Karmic):
status: In Progress → Fix Released
Changed in devicekit:
status: Unknown → Fix Released
Revision history for this message
Alvin Thompson (alvint-deactivatedaccount) wrote :

I just installed the latest updates. The 'eject' button on my laptop DVD works once for me after I reboot, but after I re-insert the disc, the eject button doesn't work again. I can eject through Nautilus without a password, however...

Changed in devicekit-disks (Ubuntu Karmic):
status: Fix Released → Confirmed
Revision history for this message
Alvin Thompson (alvint-deactivatedaccount) wrote :

The eject button on the DVD *will* work subsequent times only after I manually unmount (for example, using the "Unmount" option in Nautilus.

Changed in devicekit:
status: Fix Released → Confirmed
Revision history for this message
Alvin Thompson (alvint-deactivatedaccount) wrote :

To avoid any confusion, after inserting the disc wait until it's automatically mounted. After the disc is mounted, you can't use the eject button on the DVD drive any more.

Changed in devicekit:
status: Confirmed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Alvin, this bug is not about the eject button not working, but about the "authentication is required to unmount CDs"; that bug was fixed in Karmic (see comment 8), thus I close this again.

Can you please open a new bug for the eject button issue? Thanks!

Changed in devicekit-disks (Ubuntu Karmic):
status: Confirmed → Fix Released
Revision history for this message
Brian Rogers (brian-rogers) wrote :

Looks like the eject button is covered by bug 397734.

Revision history for this message
manolo (mac-man2005) wrote :

I have a similar problem here in Karmic.

I am unable to unmount the CDROM as normal user.
Neither the Eject applet nor Nautilus are able to eject it.

The workaround is to execute

> sudo eject /media/crdom0

Any suggestion on how to mount/unmount cdrom and dvd devices without accessing the command line?

Thanks.

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 417964] Re: Authentication always required to unmount media

manolo [2010-02-04 15:56 -0000]:
> Any suggestion on how to mount/unmount cdrom and dvd devices without
> accessing the command line?

Can you please attach /etc/fstab ?

Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Changed in devicekit:
importance: Unknown → Medium
Changed in devicekit:
importance: Medium → Unknown
Changed in devicekit:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.