control: tags -1 pending

Hi, I committed and uploaded this new file a few seconds ago.

I don't think the end user should have privileges to mount/unmount disks, so I 
gave up
in making a polkit file for everybody.

I thought about configuring it, but I don't see how I can do that.

Thanks for now for the README.Debian file, and let me know if you have another 
solution,
I'll happily review it again!

(and sorry for the long wait)

Gianfranco




Il Martedì 26 Aprile 2016 14:09, Faheem Mitha <fah...@faheem.info> ha scritto:

On Fri, 22 Apr 2016, Gianfranco Costamagna wrote:

> Hi, can you please provide a patch for this?
>
>
> I can also install a policykit file if needed, just please send a patch
>
> thanks
>
> G.

Hi Gianfranco,

This is the same patch as I posted earlier in 
https://github.com/coldfix/udiskie/issues/111

Consider creating a README.Debian with this content. Please feel free to 
make modifications as you think appropriate. Or I can make modifications 
if you want.

                                                          Regards, Faheem

########################################################################

Note that by default not all udiskie actions may be allowed. You may see 
an error like:

     GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain: Not
authorized to perform operation

That error means you need to give udiskie addition permissions to perform 
whatever actions are necessary. These permissions are governed by 
policykit (package `policykit-1` in Debian),

Here is an example. If you run `udiskie-mount` and/or `udiskie-umount` 
inside a user cron job, you will need to grant your user additional 
permissions for the policykit actions as follows:

1) `org.freedesktop.udisks2.filesystem-mount-other-seat` for when nobody 
is logged in and

2) `org.freedesktop.udisks2.filesystem-mount` when somebody is logged into 
the system in an active session.

To grant these permissions, you can (for example) create a file called 
`/etc/polkit-1/localauthority/50-local.d/10-udiskie.pkla` containing the 
following:

```
[udisks2]
Identity=unix-group:plugdev
Action=org.freedesktop.udisks2.filesystem-mount-other-seat;org.freedesktop.udisks2.filesystem-mount
ResultAny=yes

```
This gives the necessary permissions to all users in the `plugdev` group. 
If you wish to only give permissions to a single user, you can replace the 
first line with
```
Identity=unix-group:plugdev
```
Note additionally that the policykit version in Debian (for jessie and 
later) is 105. The Javascript syntax you will see for Policykit is for 
versions 106 and later. The `*.pkla` suffix and the corresponding syntax 
is only used for policykit 105 and earlier.

Reply via email to