• Unable to mount USB - Not authorized.


    pacman -Q udisks2
    udisks2 2.1.3-1

    pacman -Q gvfs
    gvfs 1.22.2-3

    groups rich
    lp wheel network video audio optical storage scanner vboxusers jukebox users

    I found some items in the Arch wiki about needing to add a polkit rule for this. I also ready 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];  
    }  
    });
    

    As soon as I saved it, seems to get loaded:

    Dec 06 12:08:04 dldsk01 polkitd[394]: Reloading rules  
    Dec 06 12:08:04 dldsk01 polkitd[394]: Collecting garbage unconditionally...  
    Dec 06 12:08:04 dldsk01 polkitd[394]: Loading rules from directory /etc/polkit-1/rules.d  
    Dec 06 12:08:04 dldsk01 polkitd[394]: Loading rules from directory /usr/share/polkit-1/rules.d  
    Dec 06 12:08:04 dldsk01 polkitd[394]: Finished loading, compiling and executing 4 rules
    

    When I enter a USB flash drive I get this:

    Dec 06 12:15:04 dldsk01 kernel: usb 4-1.6: new high-speed USB device number 12 using ehci-pci  
    Dec 06 12:15:04 dldsk01 kernel: usb-storage 4-1.6:1.0: USB Mass Storage device detected  
    Dec 06 12:15:04 dldsk01 kernel: scsi host19: usb-storage 4-1.6:1.0  
    Dec 06 12:15:04 dldsk01 mtp-probe[580]: checking bus 4, device 12: "/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.6"  
    Dec 06 12:15:04 dldsk01 mtp-probe[580]: bus: 4, device: 12 was not an MTP device  
    Dec 06 12:15:05 dldsk01 kernel: scsi 19:0:0:0: Direct-Access SanDisk U3 Cruzer Micro 4.05 PQ: 0 ANSI: 2  
    Dec 06 12:15:05 dldsk01 kernel: scsi 19:0:0:1: CD-ROM SanDisk U3 Cruzer Micro 4.05 PQ: 0 ANSI: 2  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] 8013453 512-byte logical blocks: (4.10 GB/3.82 GiB)  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] Write Protect is off  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] Mode Sense: 03 00 00 00  
    Dec 06 12:15:05 dldsk01 kernel: sr 19:0:0:1: [sr1] scsi3-mmc drive: 8x/40x writer xa/form2 cdda tray  
    Dec 06 12:15:05 dldsk01 kernel: sr 19:0:0:1: Attached scsi CD-ROM sr1  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] No Caching mode page found  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] Assuming drive cache: write through  
    Dec 06 12:15:05 dldsk01 kernel: sdg: sdg1  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] Attached SCSI removable disk  
    Dec 06 12:15:05 dldsk01 gnome-session[574]: Gjs-Message: JS LOG: Unable to mount volume ANTERGOS: Gio.IOErrorEnum: Not authorized to perform operation
    

    Suggestions?

  • pacman -Q udisks2
    udisks2 2.1.3-1

    pacman -Q gvfs
    gvfs 1.22.2-3

    groups rich
    lp wheel network video audio optical storage scanner vboxusers jukebox users

    I found some items in the Arch wiki about needing to add a polkit rule for this. I also ready 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];  
    }  
    });
    

    As soon as I saved it, seems to get loaded:

    Dec 06 12:08:04 dldsk01 polkitd[394]: Reloading rules  
    Dec 06 12:08:04 dldsk01 polkitd[394]: Collecting garbage unconditionally...  
    Dec 06 12:08:04 dldsk01 polkitd[394]: Loading rules from directory /etc/polkit-1/rules.d  
    Dec 06 12:08:04 dldsk01 polkitd[394]: Loading rules from directory /usr/share/polkit-1/rules.d  
    Dec 06 12:08:04 dldsk01 polkitd[394]: Finished loading, compiling and executing 4 rules
    

    When I enter a USB flash drive I get this:

    Dec 06 12:15:04 dldsk01 kernel: usb 4-1.6: new high-speed USB device number 12 using ehci-pci  
    Dec 06 12:15:04 dldsk01 kernel: usb-storage 4-1.6:1.0: USB Mass Storage device detected  
    Dec 06 12:15:04 dldsk01 kernel: scsi host19: usb-storage 4-1.6:1.0  
    Dec 06 12:15:04 dldsk01 mtp-probe[580]: checking bus 4, device 12: "/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.6"  
    Dec 06 12:15:04 dldsk01 mtp-probe[580]: bus: 4, device: 12 was not an MTP device  
    Dec 06 12:15:05 dldsk01 kernel: scsi 19:0:0:0: Direct-Access SanDisk U3 Cruzer Micro 4.05 PQ: 0 ANSI: 2  
    Dec 06 12:15:05 dldsk01 kernel: scsi 19:0:0:1: CD-ROM SanDisk U3 Cruzer Micro 4.05 PQ: 0 ANSI: 2  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] 8013453 512-byte logical blocks: (4.10 GB/3.82 GiB)  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] Write Protect is off  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] Mode Sense: 03 00 00 00  
    Dec 06 12:15:05 dldsk01 kernel: sr 19:0:0:1: [sr1] scsi3-mmc drive: 8x/40x writer xa/form2 cdda tray  
    Dec 06 12:15:05 dldsk01 kernel: sr 19:0:0:1: Attached scsi CD-ROM sr1  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] No Caching mode page found  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] Assuming drive cache: write through  
    Dec 06 12:15:05 dldsk01 kernel: sdg: sdg1  
    Dec 06 12:15:05 dldsk01 kernel: sd 19:0:0:0: [sdg] Attached SCSI removable disk  
    Dec 06 12:15:05 dldsk01 gnome-session[574]: Gjs-Message: JS LOG: Unable to mount volume ANTERGOS: Gio.IOErrorEnum: Not authorized to perform operation
    

    Suggestions?

  • does the output of

    pacman -Qi linux
    

    match

    uname -a
    

    Also, what is the output of

    cat /etc/pam.d/login
    

    Is consolekit installed?
    I am wondering that [code:podudjhe]ntfs-3g[/code:podudjhe] might need to be installed. Do not install it as I’m not entirely sure it would need to be. I am only posturing the possibility of it should your USB be ntfs file system.

    I think that the problem might be with policykit as this is what sets the permission tables.

    Download " antergos-wallpapers-extra " and enjoy community sponsored wallpapers.

    Use the "Linux Beginner Search Engine"

    https://cse.google.com/cse/home?cx=017607476515012185699:b_owgx6xyi0

  • Thanks, hopefully the the following help with more suggestions:

    $ pacman -Qi linux

    Name : linux  
    Version : 3.17.4-1  
    Description : The Linux kernel and modules  
    Architecture : x86\_64  
    URL : http://www.kernel.org/  
    Licenses : GPL2  
    Groups : base  
    Provides : kernel26=3.17.4  
    Depends On : coreutils linux-firmware kmod mkinitcpio\>=0.7  
    Optional Deps : crda: to set the correct wireless channels of your country [installed]  
    Required By : virtualbox-host-modules  
    Optional For : None  
    Conflicts With : kernel26  
    Replaces : kernel26  
    Installed Size : 73301.00 KiB  
    Packager : Tobias Powalowski <[email protected]\>  
    Build Date : Fri 21 Nov 2014 03:18:29 PM EST  
    Install Date : Mon 01 Dec 2014 10:10:35 AM EST  
    Install Reason : Explicitly installed  
    Install Script : Yes  
    Validated By : Signature
    

    $ uname -a
    Linux dldsk01 3.17.4-1-ARCH #1 SMP PREEMPT Fri Nov 21 21:14:42 CET 2014 x86_64 GNU/Linux

    $ cat /etc/pam.d/login

    \#%PAM-1.0  
      
    auth required pam\_securetty.so  
    auth requisite pam\_nologin.so  
    auth include system-local-login  
    account include system-local-login  
    session include system-local-login
    

    $ pacman -Q consolekit
    error: package ‘consolekit’ was not found

    $ pacman -Q ntfs-3g
    ntfs-3g 2014.2.15-1

  • Not sure if this is related, I’m new to logind and such, but I was expecting this to show my ID not lightdm. Being that lightdm is not in many groups I wonder if that is why I see a permissions problem.

    [[email protected] ~]$ loginctl   
    SESSION UID USER SEAT   
    c1 620 lightdm seat0   
      
    1 sessions listed.  
      
    [[email protected] ~]$ loginctl show-session -p Active c1  
    Active=yes  
      
    [[email protected] ~]$ groups lightdm  
    lightdm
    

    Should that show my ID and not lightdm?

  • Hi,

    The lightdm user is normal. Try changing the contents of the following files as shown:[config=/etc/pam.d/lightdm:2cyrhs0j]#%PAM-1.0
    auth include system-login
    auth optional pam_gnome_keyring.so
    account include system-login
    password include system-login
    session include system-login
    session optional pam_gnome_keyring.so auto_start[/config:2cyrhs0j]
    [config=/etc/pam.d/login:2cyrhs0j]#%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[/config:2cyrhs0j]

    Cheers!

  • thanks, made suggested changes and rebooted.

    Same messages when I insert a USB:

    Dec 11 13:59:33 dldsk01 kernel: usb 2-1.6: new high-speed USB device number 3 using ehci-pci  
    Dec 11 13:59:33 dldsk01 kernel: usb-storage 2-1.6:1.0: USB Mass Storage device detected  
    Dec 11 13:59:33 dldsk01 kernel: scsi host7: usb-storage 2-1.6:1.0  
    Dec 11 13:59:33 dldsk01 mtp-probe[1064]: checking bus 2, device 3: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6"  
    Dec 11 13:59:33 dldsk01 mtp-probe[1064]: bus: 2, device: 3 was not an MTP device  
    Dec 11 13:59:34 dldsk01 kernel: scsi 7:0:0:0: Direct-Access SanDisk U3 Cruzer Micro 4.05 PQ: 0 ANSI: 2  
    Dec 11 13:59:34 dldsk01 kernel: scsi 7:0:0:1: CD-ROM SanDisk U3 Cruzer Micro 4.05 PQ: 0 ANSI: 2  
    Dec 11 13:59:34 dldsk01 kernel: sd 7:0:0:0: [sdg] 8013453 512-byte logical blocks: (4.10 GB/3.82 GiB)  
    Dec 11 13:59:34 dldsk01 kernel: sd 7:0:0:0: [sdg] Write Protect is off  
    Dec 11 13:59:34 dldsk01 kernel: sd 7:0:0:0: [sdg] Mode Sense: 03 00 00 00  
    Dec 11 13:59:34 dldsk01 kernel: sr 7:0:0:1: [sr1] scsi3-mmc drive: 8x/40x writer xa/form2 cdda tray  
    Dec 11 13:59:34 dldsk01 kernel: sr 7:0:0:1: Attached scsi CD-ROM sr1  
    Dec 11 13:59:34 dldsk01 kernel: sd 7:0:0:0: [sdg] No Caching mode page found  
    Dec 11 13:59:34 dldsk01 kernel: sd 7:0:0:0: [sdg] Assuming drive cache: write through  
    Dec 11 13:59:35 dldsk01 kernel: sdg: sdg1  
    Dec 11 13:59:35 dldsk01 kernel: sd 7:0:0:0: [sdg] Attached SCSI removable disk  
    Dec 11 13:59:35 dldsk01 dbus[383]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'  
    Dec 11 13:59:35 dldsk01 gnome-session[579]: Gjs-Message: JS LOG: Unable to mount volume ANTERGOS: Gio.IOErrorEnum: Not authorized to perform operation  
    Dec 11 13:59:35 dldsk01 dbus[383]: [system] Successfully activated service 'org.freedesktop.hostname1'
    
  • Don’t ask my why you would need to do this but give it a try:

    [config=/etc/polkit-1/localauthority/50-local.d/auto-mount.pkla:82dh1bns][Allow Automount]
    Identity=unix-group:plugdev
    Action=org.freedesktop.udisks2.filesystem-mount
    ResultAny=yes
    ResultInactive=yes
    ResultActive=yes[/config:82dh1bns]

  • For starters I don’t have a “localauthority” directory. I only have a “rules.d” directory at that level. Is that a sign of something else wrong? Should I create the directory structure? Anything else missing in this directory structure?

  • No dont do that. You shouldnt need that file. It was just something that I thought might get it working. Is your password for gnome keyring the same as your user account password? Are you using regular login or autologin? Create a tar file with copies of the following directories and post it here:

    /etc/pam.d  
    /etc/systemd
    

    Also include the output file from this command:[command:3lr9br3o]gsettings list-recursively > gsettings.export[/command:3lr9br3o]

    Best Regards,

  • Is your password for gnome keyring the same as your user account password?

    Yes, but it still asks for it at login before I get to the desktop.

    Are you using regular login or autologin?

    Regular - lightdm is asking for ID & Password.

Posts 11Views 2938
Log in to reply