Posts: 1,028
SamK
Joined: 21 Aug 2011
#1
This topic was forked from: post21711.html#p21711
I hope it is not excessively recovering any previous discussions.

The problem of an unprivileged user being unable to (un)mount usb devices without generating a"Not Aurthorized" message seems to have two strands to it.
  • * SLiM, the dislay manager
  • * ConsoleKit, keeps track of users, sessions, etc
It appears that it is a known issue to which three possible approaches may be taken:
1. A permanent resolution
2. Two alternative workarounds that work with ROX-filer and other file managers
3. Wait until the cause of the symptoms have been fixed
Probably none of the options are ideal for antiX.


Permanent Resolution
One posible resolution is to replace SLiM with GDM3 as described in this thread:
usb-not-authorized-in-pcmanfm-nautilus-t3280.html

This may not be a palatable choice for antiX at present as it involves a major change to a main component. I am guessing that SLiM was chosen due to it being light in its use of system resources. I have no figures to show whether GDM3 is any better or worse in this respect. Historically, GDM has tended to be more heavyweight and this probably goes against the antiX philosophy. SLiM is now unmaintained, so there may be a question over it remaining useful in the longer term.


Alternative Workarounds
A bug has been reported in ConsoleKit and is currently being worked on.

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597937"
linktext was:"http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597937"
====================================


The the bug report and this message both report success in downgrading the version of ConsoleKit.

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://lists.debian.org/debian-user/2011/06/msg01586.html"
linktext was:"http://lists.debian.org/debian-user/201 ... 01586.html"
====================================


I have not yet enough experience with antiX to know how to conduct such a downgrade and pinning. Perhaps one of the more experienced antiX user community could test whether such an action does resolve the issue. In any event I would welcome a description of the method of downgrading and pinning. My guess is that if it works this represents a good holding position.


Success has been reported by making a change to policykit.

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://blog.dale.id.au/archives/1068"
linktext was:"http://blog.dale.id.au/archives/1068"
====================================


I have tested this one and its does work, restoring what might be described as usual and expected capabilities to an unprivileged user. It is not clear how long this method might remain usable as it has been suggested that it exploits a bug. If anyone wishes to test this in conjunction with the unplugdrive.sh script it is best to rename /etc/udev/rules.d/99-usbstorage as 99-usbstorage.unused.


Wait for an Upstream Fix
A self explanatory description.
Posts: 1,028
SamK
Joined: 21 Aug 2011
#2
Having lived with the change to policykit fix for a few days it has worked consistently and reliably.

In case the original site goes missing I thought it might be worth recording the method here. It seems to be based on an article from Archlinux. See the section"Mounting as normal user" on this page:

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://wiki.archlinux.org/index.php/PCManFM"
linktext was:"https://wiki.archlinux.org/index.php/PCManFM"
====================================



Method to Mount & Unmount via a File Manager Without Error Message"Not Authorised"
Turn off wrapping in your text editor

Add a File to Policykit
As root create a text file:

Code: Select all

/etc/polkit-1/localauthority/50-local.d/55-storage.pkla
Add the following:

Code: Select all

[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
Note: Action=org... to ...spindown is on the same line
Note: Policykit will automatically recognize the newly added file.


Verify Your User Account has Membership of the plugdev Group
getent group | grep plugdev
Note: Your account is included by default in antiX-M11


If Not Currently a Member of the plugdev Group
Add membership to your account

Code: Select all

usermod -a -G plugdev YOUR-LOGIN
Logout and log back in for above to take effect


Edit SamK
* Fix typos
Posts: 1,062
Dave
Joined: 20 Jan 2010
#3
Thanks for sharing SamK,
I have tried the meathod posted above and it to is working well for me. I have a usb stick that was known to produce that error, but it is working fine now.
__{{emoticon}}__ thanks again
Posts: 173
DeepDayze
Joined: 09 Sep 2011
#4
I got USB automount as user working with creating the /etc/polkit-1/localauthority/50-local.d/55-storage.pkla file. As for the ConsoleKit bug I'll live with it for now until it's fixed in a future update.
Posts: 2
eldergeek
Joined: 15 Jun 2012
#5
"Wait for an Upstream Fix"

Considering the post I copy/pasted this suggestion from is 11 months old, how much faith should I put in the notion of an upstream fix?

I need a lightweight distro for some 1 GHz, P3s (each having a half gig of ram). Which belong to a pair of 12 Y.O. twins. They're running Xubuntu 10.04 LTS well enough but it's now obsolete and the machines are terribly slow with Xubuntu 12.04 LTS. Antix seems perfect for the machines (the kids don't live near me but I have another, very similar, machine I've been using to test-drive various distros) but these kids regularly move files around on USB flash (thumb) drives.

I can talk their older brother through installing Antix well enough but I don't think he can cope with any of the"fixes" listed here for this issue. This really rains on my parade. __{{emoticon}}__