SparkyLinux Forums

Installation & Upgrade => System upgrading => Topic started by: red.iceman on November 25, 2016, 08:33:11 AM

Title: Unable to mount usbstick since upgrade (gvfs?)
Post by: red.iceman on November 25, 2016, 08:33:11 AM
Hi,

since thursday I cannot mount usbsticks anymore: "not authorized to perform operation"
In happens in all gvfs based filemanagers like nemo, thunar, pcmanfm, nautilus..., while dolphin works fine.

System: Lenovo X240
Desktop: Budgie, XFCE

Any idea?

Jens


Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: pavroo on November 25, 2016, 11:22:12 AM
Make sure you have installed 'policykit-1-gnome' package and 'polkit-gnome-authentication-agent-1' is enabled to start with the system starts.
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: red.iceman on November 25, 2016, 11:39:31 AM

# sudo aptitude search policykit-1
i A policykit-1                                                             - Rahmen für die Verwaltung von Privilegien und administrativen Verfahren         
p   policykit-1:i386                                                        - Rahmen für die Verwaltung von Privilegien und administrativen Verfahren         
p   policykit-1-doc                                                         - Dokumentation für PolicyKit-1                                                   
i A policykit-1-gnome                                                       - XFCE and Unity authentication agent for PolicyKit-1                             
p   policykit-1-gnome:i386                                                  - XFCE and Unity authentication agent for PolicyKit-1


Quote from: pavroo on November 25, 2016, 11:22:12 AM
Make sure you have [...] 'polkit-gnome-authentication-agent-1' is enabled to start with the system starts.
How can I verify this?

Jens
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: Dai_trying on November 25, 2016, 12:41:45 PM
apt-cache policy policykit-1
if you have a line that says Installed <version> then it is installed, if it says Installed: (none) then it is not installed.
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: red.iceman on November 25, 2016, 01:20:55 PM

# apt-cache policy policykit-1

policykit-1:
  Installiert:           0.112-5.3.1~really-0.105-8
  Installationskandidat: 0.112-5.3.1~really-0.105-8
  Versionstabelle:
*** 0.112-5.3.1~really-0.105-8 100
        100 /var/lib/dpkg/status
     0.105-17 500
        500 http://ftp.debian.org/debian testing/main amd64 Packages


As far as I understand it doesn't mean that 'polkit-gnome-authentication-agent-1' is enabled.
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: pavroo on November 25, 2016, 05:15:46 PM
Check does it work now:
pidof polkit-gnome-authentication-agent-1
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: red.iceman on November 25, 2016, 05:43:18 PM

# pidof polkit-gnome-authentication-agent-1
#

Okay, it is not running.


# ls /etc/xdg/autostart/polkit*
/etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop /etc/xdg/autostart/polkit-mate-authentication-agent-1.desktop
/etc/xdg/autostart/polkit-kde-authentication-agent-1.desktop


So it should be started, shouldn't it?
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: pavroo on November 25, 2016, 09:38:19 PM
Copy polkit-gnome-authentication-agent-1.desktop to home dir:
~HOME/.config/autostart/polkit-gnome-authentication-agent-1.desktop
Then reboot.

And make sure the exec line is:
Exec=/usr/lib/polkit-gnome-authentication-agent-1
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: red.iceman on November 25, 2016, 10:54:30 PM
Sorry, still the same error.


# pidof polkit-gnome-authentication-agent-1
# ps ax | grep polkit
  930 ?        Ssl    0:00 /usr/lib/policykit-1/polkitd --no-debug
2145 ?        Sl     0:00 budgie-polkit-dialog
2553 pts/0    S+     0:00 grep polkit
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: red.iceman on November 25, 2016, 11:15:48 PM
I have tried the following:

create a simple .xinitrc

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
        [ -x "$f" ] && . "$f"
    done
    unset f
fi

exec budgie-desktop


reboot to init 3.

Now I can mount usb sticks.

So maybe the display manager (lightdm, but I tried slim, too) is the problem.
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: red.iceman on November 27, 2016, 11:15:15 AM
If I start without X (multiuser.target), I can mount USB sticks.
If I start with X (graphical.target), it does not work.

This is not a solution but a workaround.

Further ideas?

Jens
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: piker on December 05, 2016, 07:23:07 AM
I upgraded the other day and also have this problem. I cant access anything on a usb flash drive at all. Has anyone got an update on this?
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: piker on December 05, 2016, 10:50:19 PM
..also just realised that my auto mounts (fstab) disappeared when a usb flash is inserted.
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: red.iceman on December 06, 2016, 08:21:16 AM
No solution so far.
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: pavroo on December 06, 2016, 11:18:51 AM
Connect the usb drive and show what parted says:
sudo parted -l
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: piker on December 06, 2016, 12:22:37 PM
Heres mine, pavroo..

Model: ATA OCZ-VERTEX4 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End    Size    Type      File system     Flags
1      1049kB  110GB  110GB   primary   ext4            boot
2      110GB   128GB  17.8GB  extended
5      110GB   128GB  17.8GB  logical   linux-swap(v1)


Model: ATA TOSHIBA MK3256GS (scsi)
Disk /dev/sdb: 320GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End    Size   Type     File system  Flags
1      1049kB  320GB  320GB  primary  ext4


Model: Verbatim STORE N GO (scsi)
Disk /dev/sdc: 15.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
1      1049kB  15.5GB  15.5GB  primary  fat32        boot

# the STORE N GO is the USB flash drive
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: pavroo on December 06, 2016, 12:27:39 PM
and how your /etc/fstab looks like?
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: piker on December 06, 2016, 12:31:56 PM
I haven't put an entry for USB flash drives in there:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc   /proc   proc   defaults   0   0
#Entry for /dev/sda1 :
UUID=3a6ecf5a-7c47-44d3-9718-e83b9c6e4aac   /   ext4   defaults,noatime,errors=remount-ro,discard   0   1
#Entry for /dev/sdb1 :
UUID=5fd5300d-3091-4c1c-b6e2-eaf5e5bd641f   /media/daryl/Backups   ext4   defaults,nosuid,nodev,relatime,data=ordered   0   0
#Entry for /dev/sda5 :
UUID=895b06c9-5b52-40b2-9673-58057030f53c   swap   swap   sw   0   0
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: pavroo on December 06, 2016, 12:39:34 PM
Just a test - can you comment the line:
UUID=5fd5300d-3091-4c1c-b6e2-eaf5e5bd641f   /media/daryl/Backups   ext4   defaults,nosuid,nodev,relatime,data=ordered   0   0
to be not mounted automatically and reboot to check.
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: piker on December 06, 2016, 12:48:29 PM
Ok, did that. I get a "Not authorized to perform operation" message for the Backups drive as well as the usb flash drive now.
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: pavroo on December 06, 2016, 12:56:13 PM
what groups do you belong? run (as regular user):
groups
and what is your desktop you are using now?
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: piker on December 06, 2016, 12:58:34 PM
daryl@lapdog:~$ groups
daryl adm dialout fax cdrom floppy tape sudo audio dip video plugdev users scanner lpadmin netdev bluetooth fuse

#I am using lxqt desktop
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: pavroo on December 06, 2016, 01:12:31 PM
I have to upgrade my lxqt installation now, but ...
Did the mounting work before upgrading, right?
Did you upgrade the kernel too then?
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: pavroo on December 06, 2016, 01:32:15 PM
To have privileges in lxqt desktop, there is 'lxqt-policykit' required, so check is it installed.
Check does it work now, too:
pidof lxqt-policykit-agent
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: piker on December 06, 2016, 09:07:49 PM
pavroo.
I just did the "System Upgrade" as normally, via the menu icon. I am now running kernel 4.8.0-1-amd64.
Yes, mounting USB flash drives worked just fine before upgrading.
"pidof lxqt-policykit-agent" returns 1522, so it seems to be installed and working.
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: piker on December 06, 2016, 09:48:41 PM
Possibly found something here:
LXQt session settings -> Autostart
LXPolKit has an exclamation mark and when i hover over it says " Location: /home/daryl/.config/autostart/lxpolkit.desktop    Overrides: /etc/xdg/autostart/lxpolkit.desktop"
# anything in this?
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: pavroo on December 06, 2016, 11:12:27 PM
aaaahhhhh!
How did you install lxqt? via minimalGUI/CLI iso? Let me know, please.

LXQt does not use lxpolkit, your existing lxpolkit.desktop brakes the default one so remove:
/home/daryl/.config/autostart/lxpolkit.desktop
LXQt uses lxqt-policykit-agent instead.

Then reboot.
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: piker on December 07, 2016, 01:21:42 AM
I uninstalled lxsession (should I have purged as well?), then found that lxqt-policykit was already installed anyway, rebooted, inserted a usb flash disk and still got the "Not authorized ..." error. However when I clicked on the Removeable media/devices Manager (menu bar)->USBDISK and it opened another session of PcmanFm in which it was actually accessible! (If I already had a PCManFm session running the USBDISK is not accessible).There is still some kind of Permissions problem here somewhere and i'm willing to keep at this if you want to get to the bottom of it completely pavroo, but I do have a useable USB Disk now.
#almost forgot to mention that this was purely a System Upgrade and not a full installation. I've been a happy user of SparkyLinux LXQt for almost a year without issues.
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: red.iceman on December 08, 2016, 10:01:29 PM
Quote
I just did the "System Upgrade" as normally. I am now running kernel 4.8.0-1-amd64.
Yes, mounting USB flash drives worked just fine before upgrading.
The same is true for me. Unlike Piper, I use budgie-desktop und xfce. Thus neither lxsession nor lxqt-polkit are installed. Everything works fine as long as I do not use a display manager. Have you ever tried that, Piper?
Title: Re: Unable to mount usbstick since upgrade (gvfs?)
Post by: pavroo on December 09, 2016, 03:33:45 PM
The budgie desktop uses its own polkit front-end called 'budgie-polkit'.
Check does it work when the Budgie is loaded:
pidof budgie-polkit-dialog

The Xfce uses 'polkit-gnome-authentication-agent-1', so make sure is loaded with the Xfce ddesktop:
pidof polkit-gnome-authentication-agent-1

According to similar issue with LXQt desktop, check what files exist in your home autostart dir:
~HOME/.config/autostart/