Udisks and/or polkit problems

David Zeuthen zeuthen at gmail.com
Mon May 7 14:57:30 PDT 2012


On Mon, May 7, 2012 at 10:34 AM, Kevin Chadwick <ma1l1ists at yahoo.co.uk> wrote:
> I decided, that features gone, and after editing three files (two
> ineffectual), polkit is atleast unmounting, but before I could look at
> what that actually means in terms of what can be unmounted and
> restricting that to certain devices like I did with sudo unmount

Sorry but it's really hard to figure out where you are running into
problems. There's just not enough information in your (too long)
mail... it would be helpful if you at least copy/paste the exact
output when running umount(8) or eject(1) or otherwise describe why
you think udisks or polkit is wrong. Can't really help you otherwise.

This may help though: In general, in order to unmount devices through
nautilus that was _not_ mounted by udisks, you will need to grant your
user permission for the action
org.freedesktop.udisks2.filesystem-unmount-others. Why? Because if the
device wasn't mounted through udisks we don't know _who_ mounted it so
we have to assume it's someone else.

See the pklocalauthority(8) man page for how to do that. In a nutshell
it boils down to putting something like

 [allow-unmount-other-users]
 Identity=unix-user:davidz
 Action=org.freedesktop.udisks2.filesystem-unmount-others
 ResultAny=auth_admin
 ResultInactive=auth_admin
 ResultActive=yes

into a .pkla file, say,

 /etc/polkit-1/localauthority/50-local.d/my-udisks2-policy.pkla

after of course putting in your own username in the Identity key.
That's all there is to it.

>, it's
> asking for modify permissions. I can hit cancel but how dumb. What has
> eject possibly got to do with modify?

Eject recently got its own polkit action, see

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

    David


More information about the devkit-devel mailing list