Not permitted to mount disk ?

Monday, September 7, 2015 · 1 minute · 152 words

A few days ago, I started to have a very disturbing “Not permitted” message when trying to mount a usb disk from Thunar . The only way I found was to pmount the disk : not as intuitive as just clicking the disk on Thunar.

But after some googling, I found where was the real problem : udisk, who is responsible of mounting disks, uses polkit to know if I have the right to mount, or not, external disk. So, if you have the same problem, follow this steps :

sudo nano /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy

(use your favorite text editor in place of nano)

Then, look for the section with “udisks2.filesystem-mount”, inside you’ll have a “defaults” section with interesting stuff :

<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>

Now, replace all “auth_admin*” by “yes” to give access for every user, like this :

<defaults>
 <allow_any>yes</allow_any>
 <allow_inactive>yes</allow_inactive>
 <allow_active>yes</allow_active>
</defaults>

Save your modifications. Forget this annoying message !