Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Today, I got a Not authorized to perform operation. message when I tried to mount a drive in Thunar.

# cat /etc/polkit-1/localauthority/50-local.d/10-udiskie.pkla 
[Local Users]
Identity=unix-group:storage
Action=org.freedesktop.udisks2.*
ResultAny=yes
ResultInactive=no
ResultActive=yes

I'm in the storage group.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Rules of this sort, whether polkit or udev are no longer necessary if you have an active session under systemd/logind. Originally, rules of this sort were a workaround for non-consolekit sessions, but now Arch has moved to systemd they are no longer necessary and are more likely to inhibit correct automounting behaviour rather than assist it.

You can check that you have an active session with:

loginctl show-session $XDG_SESSION_ID

which should show amongst its output:

Remote=no 
Active=yes

If this doesn't show, and you are not using a display manager, you need to ensure that when you start X your session is preserved—so X must be run on the same TTY where login occurred. See this entry on the Arch Wiki.

share|improve this answer
add comment

I got a really dirty solution, that need more tweaking, someone edit my answer please.

       polkit.addRule(function(action, subject) {
           if (action.id.indexOf("org.freedesktop.udisks") == 0) {
                   return polkit.Result.YES;
               }
       });

Put these contents to /etc/polkit-1/rules.d/XX.rules and fixes the problem, but how should I check the caller's user-group?

http://c0debreak.blogspot.com/2012/11/fix-thunar-again-after-polkit-update-on.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.