#788526 udisks2: Unable to allow non-admin user to mount a volume

Package:
udisks2
Source:
udisks2
Description:
D-Bus service to access and manipulate storage devices
Submitter:
Hervé Werner
Date:
2015-06-12 12:12:06 UTC
Severity:
normal
#788526#5
Date:
2015-06-12 12:09:35 UTC
From:
To:
Dear Maintainer,

I'm interested in letting a normal user mount certain type of LVM snapshot
(basically to allow free access to backups). As indicated by udisks'
documentation, a normal user is only allowed to mount non-system volumes (cf
http://udisks.freedesktop.org/docs/latest/udisks-polkit-actions.html).

So I added the following udev rule :

$ cat /etc/udev/rules.d/90-lvm.rules
ENV{DM_LV_NAME}=="SNAP-?_TV_HOME", ENV{UDISKS_NAME}="SNAP_HOME-latest",
ENV{UDISKS_AUTO}="1", ENV{UDISKS_SYSTEM}="0"

However this not working, udisks2 asks me for a administrative password, even
though the udev rule above did its work :
$ udisksctl dump
/org/freedesktop/UDisks2/block_devices/dm_2d11:
  org.freedesktop.UDisks2.Block:
    Configuration:              []
    CryptoBackingDevice:        '/'
    Device:                     /dev/dm-11
    DeviceNumber:               65035
    Drive:                      '/'
    HintAuto:                   true
    HintIconName:
    HintIgnore:                 false
    HintName:                   SNAP_HOME-latest
    HintPartitionable:          false
    HintSymbolicIconName:
    HintSystem:                 false
    Id:                         by-id-dm-name-PC_VG1-SNAP--1_TV_HOME
    IdLabel:                    TV_HOME
    IdType:                     ext4
    IdUUID:                     13d69be4-520c-49d4-a71f-a1d4b7153ea5
    IdUsage:                    filesystem
    IdVersion:                  1.0
    MDRaid:                     '/'
    MDRaidMember:               '/'
    PreferredDevice:            /dev/PC_VG1/SNAP-1_TV_HOME
    ReadOnly:                   false
    Size:                       21474836480
    Symlinks:                   /dev/PC_VG1/SNAP-1_TV_HOME
                                /dev/disk/by-id/dm-name-PC_VG1-SNAP--1_TV_HOME
                                /dev/disk/by-id/dm-uuid-LVM-
A2qpzUNTI28ewKaGv3XCiiuZT9ud4hC0aH2brUjYgTTKsdk6flkGw3zXjvWT2RKW
                                /dev/disk/by-label/TV_HOME
                                /dev/disk/by-uuid/13d69be4-520c-49d4-a71f-
a1d4b7153ea5
                                /dev/mapper/PC_VG1-SNAP--1_TV_HOME



According to the polkit policy installed, a normal user should be allowed to
mount non-system volume.

My research on the web led me to a similar issue reported by Arch users :
https://bbs.archlinux.org/viewtopic.php?id=169220


Regards

H. Werner