[opensuse-factory] Unable to Mount USB Stick as Non-root
![](https://seccdn.libravatar.org/avatar/9c503bb60f1f765aabc696a60cbecc15.jpg?s=120&d=mm&r=g)
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. Any insights will be appreciated. Thanks. Charles -- "Are [Linux users] lemmings collectively jumping off of the cliff of reliable, well-engineered commercial software?" (By Matt Welsh)
![](https://seccdn.libravatar.org/avatar/eb9f93fa252f97a3d17d437ff9aa9f35.jpg?s=120&d=mm&r=g)
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.
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. HTH Michal
![](https://seccdn.libravatar.org/avatar/a725014f091bcd9e8ff16e9f2a0d7e20.jpg?s=120&d=mm&r=g)
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 -- Stefan Brüns / Bergstraße 21 / 52062 Aachen home: +49 241 53809034 mobile: +49 151 50412019 -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (3)
-
Charles Philip Chan
-
Michal Suchánek
-
Stefan Bruens