You are not logged in.

#1 2012-05-26 02:22:16

dontbugme
Banned
Registered: 2011-11-04
Posts: 166
Website

udisks2: mount only usb flash

Hello, Arch users!

How can I configure udisks2 to permit mounting only usb flash drives and similiar for users in "storage" group, not internal drives?

Here are the contents of my /etc/polkit-1/localauthority/50-local.d/10-storage-group-mount-override.pkla:

[storage group mount override]
Identity=unix-group:storage
Action=org.freedesktop.udisks2.filesystem-mount-system
ResultAny=no
ResultInactive=yes
ResultActive=yes

Or I must create another group "storage-flashonly" for this and configure something for it?
My use-case: I want to protect guest users from mounting my windows partitions, but allow them automounting of their usb flash drives.
Any thoughts aprreciated.

Last edited by dontbugme (2012-05-26 02:28:00)

Offline

#2 2012-05-26 06:27:28

tydell
Member
From: actually: Hannover, DE
Registered: 2009-07-26
Posts: 109
Website

Re: udisks2: mount only usb flash

Change Action line from

Action=org.freedesktop.udisks2.filesystem-mount-system

to

Action=org.freedesktop.udisks2.filesystem-mount

and it will be mount only removable devices, internal drives won't be mounted

Offline

#3 2012-05-27 07:06:08

dontbugme
Banned
Registered: 2011-11-04
Posts: 166
Website

Re: udisks2: mount only usb flash

Looks like working. Added additional group for guests and overrided their parameters with org.freedesktop.udisks2.filesystem-mount (ugly, I know). Thanks!

Offline

Board footer

Powered by FluxBB