[Pkg-utopia-maintainers] Bug#788526: udisks2: Unable to allow non-admin user to mount a volume

Hervé Werner dud225 at hotmail.com
Fri Jun 12 12:09:35 UTC 2015


Package: udisks2
Version: 2.1.5-3
Severity: normal

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



-- System Information:
Debian Release: stretch/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages udisks2 depends on:
ii  dbus                   1.8.18-1
ii  libacl1                2.2.52-2
ii  libatasmart4           0.19-3
ii  libc6                  2.19-18
ii  libglib2.0-0           2.44.1-1
ii  libgudev-1.0-0         230-1
ii  libpam-systemd         215-18
ii  libpolkit-agent-1-0    0.105-8
ii  libpolkit-gobject-1-0  0.105-8
ii  libsystemd0            215-18
ii  libudisks2-0           2.1.5-3
ii  parted                 3.2-7
ii  udev                   215-18

Versions of packages udisks2 recommends:
ii  dosfstools   3.0.28-1
ii  eject        2.1.5+deb1+cvs20081104-13.1
ii  gdisk        1.0.0-2
ii  ntfs-3g      1:2014.2.15AR.3-3
ii  policykit-1  0.105-8

Versions of packages udisks2 suggests:
pn  btrfs-tools     <none>
ii  cryptsetup-bin  2:1.6.6-5
pn  exfat-utils     <none>
pn  mdadm           <none>
pn  reiserfsprogs   <none>
pn  xfsprogs        <none>

-- no debconf information



More information about the Pkg-utopia-maintainers mailing list