You are not logged in.

#1 2014-12-30 15:03:03

reefland
Member
Registered: 2014-08-27
Posts: 8

Unable to mount FAT32 USB: Gio.IOErrorEnum: Not authorized to perform

I can mount this USB automatically from my Arch / KDE Laptop no issue.  But can't get it working on my Arch / GNOME desktop.  I've been searching past threads and reviewed the wiki, below are the output from the various related things I've tried.

Message in journalctl when the USB is inserted:

Dec 30 09:40:36 dldsk01 kernel: usb 2-1.6: new high-speed USB device number 5 using ehci-pci
Dec 30 09:40:36 dldsk01 kernel: usb-storage 2-1.6:1.0: USB Mass Storage device detected
Dec 30 09:40:36 dldsk01 kernel: scsi host11: usb-storage 2-1.6:1.0
Dec 30 09:40:36 dldsk01 mtp-probe[22566]: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6"
Dec 30 09:40:36 dldsk01 mtp-probe[22566]: bus: 2, device: 5 was not an MTP device
Dec 30 09:40:37 dldsk01 kernel: scsi 11:0:0:0: Direct-Access     SanDisk  U3 Cruzer Micro  4.05 PQ: 0 ANSI: 2
Dec 30 09:40:37 dldsk01 kernel: scsi 11:0:0:1: CD-ROM            SanDisk  U3 Cruzer Micro  4.05 PQ: 0 ANSI: 2
Dec 30 09:40:37 dldsk01 kernel: sd 11:0:0:0: [sdg] 8013453 512-byte logical blocks: (4.10 GB/3.82 GiB)
Dec 30 09:40:37 dldsk01 kernel: sd 11:0:0:0: [sdg] Write Protect is off
Dec 30 09:40:37 dldsk01 kernel: sd 11:0:0:0: [sdg] Mode Sense: 03 00 00 00
Dec 30 09:40:37 dldsk01 kernel: sr 11:0:0:1: [sr1] scsi3-mmc drive: 8x/40x writer xa/form2 cdda tray
Dec 30 09:40:37 dldsk01 kernel: sr 11:0:0:1: Attached scsi CD-ROM sr1
Dec 30 09:40:37 dldsk01 kernel: sd 11:0:0:0: [sdg] No Caching mode page found
Dec 30 09:40:37 dldsk01 kernel: sd 11:0:0:0: [sdg] Assuming drive cache: write through
Dec 30 09:40:37 dldsk01 kernel:  sdg: sdg1
Dec 30 09:40:37 dldsk01 kernel: sd 11:0:0:0: [sdg] Attached SCSI removable disk
Dec 30 09:40:37 dldsk01 dbus[376]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Dec 30 09:40:37 dldsk01 gnome-session[2397]: Gjs-Message: JS LOG: Unable to mount volume USB_SCRATCH: Gio.IOErrorEnum: Not authorized to perform operation
Dec 30 09:40:37 dldsk01 dbus[376]: [system] Successfully activated service 'org.freedesktop.hostname1'

$ pacman -Q udisks2 gvfs ntfs-3g polkit
udisks2 2.1.3-1
gvfs 1.22.2-4
ntfs-3g 2014.2.15-1
polkit 0.112-2

$ uname -a
Linux dldsk01 3.17.6-1-ARCH #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014 x86_64 GNU/Linux

Looks like I have an active session.

$ loginctl
   SESSION        UID USER             SEAT            
        c1        620 lightdm          seat0           

1 sessions listed.

$ loginctl show-session -p Active c1
Active=yes

Not sure if this is relevant, seen the contents of this referenced in my searches:

$ cat /etc/pam.d/login 
#%PAM-1.0

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
auth       optional     pam_gnome_keyring.so
account    include      system-local-login
session    include      system-local-login
session    optional     pam_gnome_keyring.so auto_start

I found some items in the Arch wiki about needing to add a polkit rule for this. I also read that you shouldn't have to write rules for this that systemd/logind should handle this automatically. So I'm not sure what to do. As a work around, I tried create a this rules file:

/etc/polkit-1/rules.d/10-enable-mount.rules

polkit.addRule(function(action, subject) {
   var YES = polkit.Result.YES;
   var permission = {
    "org.freedesktop.udisks2.filesystem-mount": YES,
    "org.freedesktop.udisks2.filesystem-mount-system": YES,
    "org.freedesktop.udisks2.encrypted-unlock": YES,
    "org.freedesktop.udisks2.eject-media": YES,
    "org.freedesktop.udisks2.power-off-drive": YES
   };
   if (subject.isInGroup("storage")) {
    return permission[action.id];
  }
});
$ groups rich
lp wheel network video audio optical storage scanner vboxusers jukebox users

Suggestions welcomed.

Last edited by reefland (2015-01-03 21:23:40)

Offline

#2 2015-01-03 21:21:38

reefland
Member
Registered: 2014-08-27
Posts: 8

Re: Unable to mount FAT32 USB: Gio.IOErrorEnum: Not authorized to perform

I'm still researching this issue and have found many examples of loginctl output where it appears to show the user's account.  In my case it shows "lightdm" which is DM & Greeter but not the account I log in with.  I log into lightdm with user account "rich".

Should this output reference to my account "rich" ???

[rich@dldsk01 ~]$ loginctl
   SESSION        UID USER             SEAT            
        c1        620 lightdm          seat0           

1 sessions listed.

[rich@dldsk01 ~]$ loginctl show-session c1
Id=c1
Name=lightdm
Timestamp=Sat 2015-01-03 12:57:52 EST
TimestampMonotonic=3019606
VTNr=1
Display=:0
Remote=no
Service=lightdm-greeter
Scope=session-c1.scope
Leader=464
Audit=0
Type=x11
Class=greeter
Active=yes
State=closing
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0

Offline

#3 2015-01-04 03:41:36

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: Unable to mount FAT32 USB: Gio.IOErrorEnum: Not authorized to perform

Found this:

https://bugzilla.redhat.com/show_bug.cgi?id=1130796

So post output of

grep proc /etc/mtab

Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#4 2015-01-06 13:52:25

reefland
Member
Registered: 2014-08-27
Posts: 8

Re: Unable to mount FAT32 USB: Gio.IOErrorEnum: Not authorized to perform

I don't see the "hidepid" referenced in the URL you provided.

[rich@dldsk01 ~]$ grep proc /etc/mtab
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0

Offline

#5 2015-01-07 16:44:39

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,413
Website

Re: Unable to mount FAT32 USB: Gio.IOErrorEnum: Not authorized to perform

So you're not using grsec then. Loosen polkit permissions with:

"org.freedesktop.udisks2.": YES,

to allow all udisks2 actions (or so I understood man polkit).

Another possibility is GVFS playing tricks. Might explain why you're having no issues on KDE (which uses KIO). Try devmon + udisks2 as described in the wiki.

Last edited by Alad (2015-01-07 16:47:34)


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#6 2015-01-08 16:57:44

reefland
Member
Registered: 2014-08-27
Posts: 8

Re: Unable to mount FAT32 USB: Gio.IOErrorEnum: Not authorized to perform

Loosening the polkit permissions didn't help at all - same messages.  The format you suggested was accepted:

Jan 08 09:37:44 dldsk01 polkitd[403]: Collecting garbage unconditionally...
Jan 08 09:37:44 dldsk01 polkitd[403]: Loading rules from directory /etc/polkit-1/rules.d
Jan 08 09:37:44 dldsk01 polkitd[403]: Loading rules from directory /usr/share/polkit-1/rules.d
Jan 08 09:37:44 dldsk01 polkitd[403]: Finished loading, compiling and executing 4 rules

Using devmon + udisk2  does work.  My understanding is this is bypassing udisks, policykit, consolekit, gvfs, etc.

This is a good work around for this issue for now, but I'm wondering if there is some underlying issue devmon is bypassing with my Arch installation.  I've since noticed other unrelated things not working lately like the GNOME power off:

Jan 08 11:37:54 dldsk01 gnome-session[4458]: WARNING: Shutdown failed: GDBus.Error:org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.
Jan 08 11:37:54 dldsk01 gnome-session[4458]: Entering running state
Jan 08 11:37:54 dldsk01 gnome-session[4458]: gnome-session[4458]: WARNING: Shutdown failed: GDBus.Error:org.freedesktop.DBus.Error.InteractiveAuthorizationRequired: Interactive authentication required.

Instead I use log-off and then power down from LightDM instead.

Can't use the Unlock button in Printers either - says "System policy prevents changes".

It all seems related.

Offline

Board footer

Powered by FluxBB