You are not logged in.

#1 2014-09-28 12:43:53

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Can't mount usb devices as a normal user

Hi.

I woud like to ask for help. I've been struggling with some "bug" that i came with Arch and usb devices (disks, pendrives). I can't mount it as a normal user using KDE default mounting software (Dolphin, for an exmample). I can mount it only in therminal by using sudo privileages. Is there a way to fix it? I read it, the same problem:

https://bbs.archlinux.org/viewtopic.php?id=180025

I tried to check everything according this topic, also with udisk2 archwiki thread but on my desktop machine i just can't mount usb devices without root password. This is how the error looks like for a Dolphin:
<Over sized Image removed. URL link preserved>

This is the error, from picture

Error when trying to use acces to "removable device 7,5GB". System showed: The requested operation has failed. Error checking authorization:
GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: action org.freedesktop.udisks2.filesystem-mount is not registered (polkit-error-quark, 0)

Could somebody help me? I even installed udisk mounting tool to mont without root password, added 50-udisks.policy and it just does not work.

Help.

I can mount it wit terminal by typing

sudo mount /dev/sdXY /mnt/usb 

than i'm asked for password and it is mounted. Don't know why i can't mount it without password when connecting usb devices to usb port.

moderator edit [ewaller]Removed link to over sized image..  Note, you set up a click through thumbnail correctly, but the "Thumbnail" was the same image and was too large

Last edited by ewaller (2014-09-28 16:37:41)

Offline

#2 2014-12-25 19:20:40

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Re: Can't mount usb devices as a normal user

Some refresh. I followed this topic:

https://bbs.archlinux.org/viewtopic.php?id=180025

with the same problem. I found errors here:


firekage@arch_desktop ~]$ journalctl -r -u polkit
-- Logs begin at pią 2014-06-13 18:04:12 CEST, end at czw 2014-12-25 20:15:01 CET. --
cze 23 15:59:15 arch_desktop polkitd[306]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.24, object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8) (disconnected from bus)
cze 23 15:29:59 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 20 22:21:05 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 20 22:21:03 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 20 22:21:01 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 20 22:21:00 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 20 22:20:59 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 20 22:20:58 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 20 22:20:06 arch_desktop polkitd[306]: Registered Authentication Agent for unix-session:c1 (system bus name :1.24 [/usr/lib/kde4/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)
cze 20 22:19:49 arch_desktop systemd[1]: Started Authorization Manager.
cze 20 22:19:49 arch_desktop polkitd[306]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
cze 20 22:19:49 arch_desktop polkitd[306]: Finished loading, compiling and executing 1 rules
cze 20 22:19:49 arch_desktop polkitd[306]: Loading rules from directory /usr/share/polkit-1/rules.d
cze 20 22:19:49 arch_desktop polkitd[306]: Loading rules from directory /etc/polkit-1/rules.d
cze 20 22:19:49 arch_desktop polkitd[306]: Started polkitd version 0.112
-- Reboot --
cze 20 22:15:10 arch_desktop systemd[1]: Stopping Authorization Manager...
cze 20 22:15:08 arch_desktop polkitd[304]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.23, object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)
cze 20 22:02:59 arch_desktop polkitd[304]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 20 22:02:56 arch_desktop polkitd[304]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)             
cze 20 22:02:55 arch_desktop polkitd[304]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)             
cze 20 22:02:54 arch_desktop polkitd[304]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)             
cze 20 22:02:53 arch_desktop polkitd[304]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.11 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)             
cze 20 22:00:00 arch_desktop polkitd[304]: Registered Authentication Agent for unix-session:c1 (system bus name :1.23 [/usr/lib/kde4/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)                      
cze 20 21:59:26 arch_desktop systemd[1]: Started Authorization Manager.                                                                                                                                                                                                        
cze 20 21:59:26 arch_desktop polkitd[304]: Acquired the name org.freedesktop.PolicyKit1 on the system bus                                                                                                                                                                      
cze 20 21:59:26 arch_desktop polkitd[304]: Finished loading, compiling and executing 1 rules                                                                                                                                                                                   
cze 20 21:59:26 arch_desktop polkitd[304]: Loading rules from directory /usr/share/polkit-1/rules.d                                                                                                                                                                            
cze 20 21:59:26 arch_desktop polkitd[304]: Loading rules from directory /etc/polkit-1/rules.d                                                                                                                                                                                  
cze 20 21:59:26 arch_desktop polkitd[304]: Started polkitd version 0.112                                                                                                                                                                                                       
cze 20 21:59:26 arch_desktop systemd[1]: Starting Authorization Manager...                                                                                                                                                                                                     
-- Reboot --                                                                                                                                                                                                                                                                   
cze 20 21:58:39 arch_desktop systemd[1]: Stopped Authorization Manager.                                                                                                                                                                                                        
cze 20 21:58:39 arch_desktop systemd[1]: Stopping Authorization Manager...                                                                                                                                                                                                     
cze 20 21:55:01 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)             
cze 20 21:54:59 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)             
cze 20 21:54:58 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)             
cze 20 21:54:56 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)             
cze 20 21:54:56 arch_desktop polkitd[306]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)             
cze 20 21:47:40 arch_desktop polkitd[306]: Registered Authentication Agent for unix-session:c1 (system bus name :1.21 [/usr/lib/kde4/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)                      
cze 20 21:47:22 arch_desktop systemd[1]: Started Authorization Manager.                                                                                                                                                                                                        
cze 20 21:47:22 arch_desktop polkitd[306]: Acquired the name org.freedesktop.PolicyKit1 on the system bus                                                                                                                                                                      
cze 20 21:47:22 arch_desktop polkitd[306]: Finished loading, compiling and executing 1 rules                                                                                                                                                                                   
cze 20 21:47:22 arch_desktop polkitd[306]: Loading rules from directory /usr/share/polkit-1/rules.d                                                                                                                                                                            
cze 20 21:47:22 arch_desktop polkitd[306]: Loading rules from directory /etc/polkit-1/rules.d                                                                                                                                                                                  
cze 20 21:47:22 arch_desktop polkitd[306]: Started polkitd version 0.112                                                                                                                                                                                                       
cze 20 21:47:22 arch_desktop systemd[1]: Starting Authorization Manager...                                                                                                                                                                                                     
-- Reboot --                                                                                                                                                                                                                                                                   
cze 20 19:56:46 arch_desktop systemd[1]: Stopping Authorization Manager...                                                                                                                                                                                                     
cze 20 19:56:45 arch_desktop polkitd[310]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.21, object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)                                                                              
cze 20 19:55:51 arch_desktop polkitd[310]: Registered Authentication Agent for unix-session:c1 (system bus name :1.21 [/usr/lib/kde4/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)                      
cze 20 19:55:16 arch_desktop systemd[1]: Started Authorization Manager.
cze 20 19:55:16 arch_desktop polkitd[310]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
cze 20 19:55:16 arch_desktop polkitd[310]: Finished loading, compiling and executing 1 rules
cze 20 19:55:16 arch_desktop polkitd[310]: Loading rules from directory /usr/share/polkit-1/rules.d
cze 20 19:55:16 arch_desktop polkitd[310]: Loading rules from directory /etc/polkit-1/rules.d
cze 20 19:55:16 arch_desktop polkitd[310]: Started polkitd version 0.112
cze 20 19:55:16 arch_desktop systemd[1]: Starting Authorization Manager...
-- Reboot --
cze 20 19:54:38 arch_desktop systemd[1]: Stopping Authorization Manager...
cze 20 19:54:13 arch_desktop polkitd[305]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.21, object path /org/kde/PolicyKit1/AuthenticationAgent, locale pl_PL.UTF-8)
cze 20 16:47:01 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 20 03:02:19 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 19 21:32:38 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 19 19:25:08 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 19 19:24:40 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 19 19:24:38 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 19 19:24:36 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 19 19:24:35 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)
cze 19 19:24:34 arch_desktop polkitd[305]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.freedesktop.udisks2.filesystem-mount-system for system-bus-name::1.10 [kdeinit4: kded4 [kdeinit]] (owned by unix-user:firekage)

Could somebody help me? I even checked all rules in /etc/polkit-1/rules.d and /usr/share/polkit-1/actions on my notebook, and all files are the same with the same user permission but on notebook i can mount usb without problem, but on my desktop can't at all.

Offline

#3 2014-12-25 19:24:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Can't mount usb devices as a normal user

Do you have an active login session on your desktop?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2014-12-26 00:23:27

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Re: Can't mount usb devices as a normal user

Outputs are:

[firekage@arch_desktop /usr/bin]$ loginctl list-sessions
   SESSION        UID USER             SEAT            
        c1       1000 firekage         seat0           

1 sessions listed.

than my session

[firekage@arch_desktop /usr/bin]$ loginctl show-session
NAutoVTs=6
KillExcludeUsers=root
KillUserProcesses=no
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
BlockInhibited=handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-
DelayInhibited=sleep
InhibitDelayMaxUSec=5s
HandlePowerKey=poweroff
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
HandleLidSwitch=suspend
HandleLidSwitchDocked=ignore
IdleAction=ignore
IdleActionUSec=30min
PreparingForShutdown=no
PreparingForSleep=no
lines 1-18/18 (END)

I use KDE as normal user with systemtools. It is not being started with startx or xinitrc but as a systemctl, and when i have kde login menu i just log in:

[firekage@arch_desktop /usr/bin]$ sudo systemctl status kdm.service
● kdm.service - K Display Manager
   Loaded: loaded (/usr/lib/systemd/system/kdm.service; enabled; vendor preset: disabled)
   Active: active (running) since czw 2014-12-25 18:37:29 CET; 6h ago
 Main PID: 507 (kdm)
   CGroup: /system.slice/kdm.service
           ├─507 /usr/bin/kdm -nodaemon
           └─531 /usr/bin/Xorg.bin -br -novtswitch -quiet :0 vt7 -nolisten tcp -...

gru 25 18:37:29 arch_desktop systemd[1]: Starting K Display Manager...
gru 25 18:37:29 arch_desktop systemd[1]: Started K Display Manager.
gru 25 18:38:11 arch_desktop kdm[574]: :0[574]: pam_unix(kde:session): session...0)
Hint: Some lines were ellipsized, use -l to show in full.
[firekage@arch_desktop /usr/bin]$ 

Hm, strange. It looks like there is no active=yes in loginctl --show-session. But when i do this

[firekage@arch_desktop /usr/bin]$ loginctl
   SESSION        UID USER             SEAT            
        c1       1000 firekage         seat0           

1 sessions listed.

than it is

[firekage@arch_desktop /usr/bin]$ loginctl show-session c1
Id=c1
Name=firekage
Timestamp=czw 2014-12-25 18:38:11 CET
TimestampMonotonic=53934022
VTNr=7
Display=:0
Remote=no
Service=kde
Scope=session-c1.scope
Leader=574
Audit=0
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
[firekage@arch_desktop /usr/bin]$ 


Edit:

Hm, you can laugh but...problem just dissapeared. In fact, i'm curious what could it be? Just as i said earlier, i checked all policykit files in :

/etc/polkit-1/rules.d/

and in

 /usr/share/polkit-1/actions

I, according to one post from another topic, just "deleted" (changed names, as a backup solution to all files that i had stored in /etc/polkit-1/rules.d) exept one file: 50-default.rules because it is being said that udev/udisks should mount usb out of the box. Next i just again checked all in /usr/share/polkit-1/actions and in one file,

org.freedesktop.udisks2.policy

and here i revert changes that i had done earlier (when i tried to find a solution for this problem and it is just suggested), checked the same file on my notebook and just did what i mentioned. Still, no luck.


Now i accidentally hit "usb' in dolphin and it was being mounted without problem [:|]. The only thing that i did, was reinstallation of udisks but without any dependancies. I just hit:

sudo pacman -Rdd udisks2 && sudo pacman -S udisks2

So in fact, i still don't know what happened, how i fixed it. Maybe udisks2 package was corrupted, at fault? I restored earlier policies and it didn't solve my problem. Now it works.

Forget to mention: besides of udisks2, that i just reinstalled, i installed also udevil. It works. Maybe it is because of it. I don't have though it on notebook. Strange.

I'm very happy. Thanks again for all who tried to helped me. smile


Edit: yes, udevil is not needed, removed, rebooted, works.

Maybe it is stupid, but it policy is changed, reboot is needed? If yes, than maybe reverted changes and rebooted fixed my problem - if yes, than suggestion over the www was misleading.

Last edited by firekage (2014-12-26 01:26:25)

Offline

Board footer

Powered by FluxBB