On Donnerstag, 31. August 2017 21:09:13 CEST Michal Suchánek wrote:
Hello,
On Thu, 31 Aug 2017 14:32:43 -0400
Charles Philip Chan cpchan777@gmail.com wrote:
Hello all,
I haven't had a need to mount an USB stick in a long time and now I am not able to mount it as non-root. I don't use any DE's. However, I have following polkit rule in /etc/polkit-1/rules.d/10-udisks2.rules:
// Allow udisks2 to mount devices without authentication // for users in the "trusted" group. polkit.addRule(function(action, subject) {
if ((action.id ==
"org.freedesktop.udisks2.filesystem-mount-system" || action.id == "org.freedesktop.udisks2.filesystem-mount") && subject.isInGroup("trusted")) { return polkit.Result.YES;
}
});
I am in the trusted group. This used to work but not anymore.
You can check your authorizations with e.g.:
pkcheck -p $$ -a org.freedesktop.udisks2.filesystem-mount-system
For debugging, you can add --- polkit.log("action=" + action); polkit.log("subject=" + subject); --- to your rules.
I tried to debug this a while back and in the end resorted to using pmount which is really easy to set up - unlike anything using policykit.
Note that you need a file manager that asks policykit to mount the device. AFAIK mount(8) does not use policykit so any amount of policy settings won't help you.
udiskctl mount ...
Regards,
Stefan