If you are like me and like to run a custom install of Debian with a lightweight setup with Fluxbox, SLiM, PCManFM, etc and you have problems with mounting USB devices such as flash drives etc and get the “Not Authorized” message in PCManFM under Debian, here is a workaround that should still work after upgrade, rather than editing ‘
/usr/share/polkit-1/actions/org.freedesktop.udisks.policy‘ itself, which does not last after software upgrade of udisks if I am not mistaken, but I sure someone will correct me if I am wrong 😉
As root create:
# /etc/polkit-1/localauthority/50-local.d/55-storage.pkla
and add the following:
[Storage Permissions] Identity=unix-group:plugdev Action=org.freedesktop.udisks.filesystem-mount;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks.drive-detach;org.freedesktop.udisks.luks-unlock;org.freedesktop.udisks.inhibit-polling;org.freedesktop.udisks.drive-set-spindown ResultAny=yes ResultActive=yes ResultInactive=no
Polkit will automatically recognize the newly added file.
To make sure you have the ability to mount the USB devices, be sure to add yourself to the plugdev group
# usermod -a -G plugdev YOUR-LOGIN
Now logout and log back in for above to take effect if you just added yourself to the plugdev
Reference:
PCManFM – ArchWiki
23:32, Friday, August 19, 2011Pete /
NIce work Dale,
You probably should report this as a usability bug or somesuch.
Surely if the user is in plug-dev that means the admin means for them to use the usb sticks.
Policy Kit should not overide the admin ever.
(or should bitch loudly if it needs to)
(shrug)
11:24, Saturday, August 27, 2011Coburn /
Thanks for the article. It helped me troubleshoot a painful issue on x86 Debian Wheezy.
Silly policykit and it’s restrictive actions… Tsk tsk 😛
10:59, Monday, October 31, 2011Mark White /
Running Ubuntu-x64 minimal install with Slim, Awesome WM and PCManFM, and this worked a treat for me! Nice one 🙂
23:34, Thursday, January 26, 2012a. m. battles /
thank you thank you thank you thank you thank you thank you thank you.
just asked a question about this:
http://unix.stackexchange.com/questions/30059/why-is-pcmanfm-such-a-headache-when-it-comes-to-mounting-filesystems
4:53, Tuesday, April 10, 2012Artur Borodziej /
Great article. Short and useful :). Running Debian Sid with Lxde and your tip worked like a charm 🙂
5:44, Sunday, May 6, 2012Antonio /
I’m using Window Maker + pcmanfm on Lubuntu and it worked great.
Greetings from Portugal. Thanks.