When attaching a USB drive, prompted with "You are not authorized to mount this device."

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
bwhawk
Posts: 62
Joined: Mon Mar 19, 2018 8:26 am

When attaching a USB drive, prompted with "You are not authorized to mount this device."

#1 Post by bwhawk »

I've recently installed MX 23.1 KDE. When I insert a USB drive, I'm prompted to mount it. When I do, I get the message "You are not authorized to mount this device."

If I click on the drive in Dolphin, I get the message "An error occurred while accessing 'backup', the system responded: Cannot request authentication for this action. The PolicyKit authentication system appears to be not available.: Not authorized to perform operation"

I am able to mount from the command line using sudo:

Code: Select all

sudo mount /dev/sda1 /media/backup/
But I was hoping to be able to mount a drive without resorting to that.

Code: Select all

Snapshot created on: 20231115_1510
System:
  Kernel: 6.1.0-13-amd64 [6.1.55-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-13-amd64 root=UUID=<filter> ro
  Desktop: KDE Plasma v: 5.27.5 wm: kwin_x11 vt: 7 dm: SDDM Distro: MX-23.1_x64 Libretto
    November 15 2023 base: Debian GNU/Linux 12 (bookworm)
Machine:
  Type: Desktop Mobo: N/A model: N/A serial: <superuser required> UEFI: American Megatrends LLC.
    v: 5.27 date: 02/22/2023
CPU:
  Info: model: 12th Gen Intel Core i5-1235U bits: 64 type: MST AMCP arch: Alder Lake level: v3
    note: check built: 2021+ process: Intel 7 (10nm ESF) family: 6 model-id: 0x9A (154) stepping: 4
    microcode: 0x430
  Topology: cpus: 1x cores: 10 mt: 2 tpc: 2 st: 8 threads: 12 smt: enabled cache: L1: 928 KiB
    desc: d-8x32 KiB, 2x48 KiB; i-2x32 KiB, 8x64 KiB L2: 6.5 MiB desc: 2x1.2 MiB, 2x2 MiB L3: 12 MiB
    desc: 1x12 MiB
  Speed (MHz): avg: 534 high: 714 min/max: 400/4400:3300 scaling: driver: intel_pstate
    governor: powersave cores: 1: 657 2: 400 3: 584 4: 400 5: 400 6: 628 7: 572 8: 593 9: 664 10: 400
    11: 400 12: 714 bogomips: 59904
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Enhanced IBRS, IBPB: conditional, RSB filling, PBRSB-eIBRS: SW
    sequence
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Alder Lake-UP3 GT2 [Iris Xe Graphics] driver: i915 v: kernel arch: Gen-12.2
    process: Intel 10nm built: 2021-22+ ports: active: HDMI-A-1 empty: DP-1 bus-ID: 00:02.0
    chip-ID: 8086:46a8 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 with: Xwayland v: 22.1.9 compositor: kwin_x11 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96 s-size: 1016x571mm (40.00x22.48")
    s-diag: 1165mm (45.88")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 model: ASUS VG289Q1A serial: <filter> built: 2023
    res: 3840x2160 hz: 60 dpi: 157 gamma: 1.2 size: 621x341mm (24.45x13.43") diag: 708mm (27.9")
    ratio: 16:9 modes: max: 3840x2160 min: 640x480
  API: OpenGL v: 4.6 Mesa 23.1.2-1~mx23ahs renderer: Mesa Intel Graphics (ADL GT2)
    direct-render: Yes
Audio:
  Device-1: Intel Alder Lake PCH-P High Definition Audio driver: snd_hda_intel v: kernel
    alternate: snd_sof_pci_intel_tgl bus-ID: 3-7:6 chip-ID: 0573:1573 bus-ID: 00:1f.3 class-ID: 0300
    chip-ID: 8086:51c8 serial: <filter> class-ID: 0403
  Device-2: Zoran Personal Media Division (Nogatech) USB Audio and HID type: USB
    driver: snd-usb-audio
  API: ALSA v: k6.1.0-13-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 0.3.65 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Ethernet I219-V driver: e1000e v: kernel port: N/A bus-ID: 00:1f.6
    chip-ID: 8086:1a1f class-ID: 0200
  IF: eth0 state: down mac: <filter>
  Device-2: Intel Wireless 7260 driver: iwlwifi v: kernel modules: wl pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 04:00.0 chip-ID: 8086:08b1 class-ID: 0280
  IF: wlan0 state: up mac: <filter>
  IF-ID-1: wg-mullvad state: unknown speed: N/A duplex: N/A mac: N/A
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 bus-ID: 3-8:7
    chip-ID: 8087:07dc class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 2.1 lmp-v: 4.0
    sub-v: e00 hci-v: 4.0 rev: e00
  Info: acl-mtu: 1021:5 sco-mtu: 96:6 link-policy: rswitch hold sniff
    link-mode: peripheral accept service-classes: rendering, capturing, object transfer, audio,
    telephony
Drives:
  Local Storage: total: 2.07 TiB used: 366.11 GiB (17.3%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 990 PRO 2TB size: 1.82 TiB
    block-size: physical: 512 B logical: 512 B speed: 63.2 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 0B2QJXG7 temp: 49.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 type: USB vendor: Samsung model: Flash Drive size: 239.02 GiB
    block-size: physical: 512 B logical: 512 B type: SSD serial: <filter> rev: 1100 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
  ID-3: /dev/sdb maj-min: 8:16 type: USB vendor: SanDisk model: Cruzer Glide size: 14.56 GiB
    block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> rev: 1.27 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 1.82 TiB size: 1.79 TiB (98.37%) used: 366.11 GiB (20.0%) fs: ext4
    dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 274 KiB (0.1%) fs: vfat
    dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 6 GiB used: 0 KiB (0.0%) priority: -2 file: /swap/swap
  ID-2: swap-2 type: zram size: 256 MiB used: 2 MiB (0.8%) priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 38.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: pm: dpkg pkgs: 2443 libs: 1339 tools: apt,apt-get,aptitude,nala pm: rpm pkgs: 0
    pm: flatpak pkgs: 0
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://mxrepo.com/mx/repo/ bookworm main non-free
    2: deb http://mxrepo.com/mx/repo/ bookworm ahs
  Active apt repos in: /etc/apt/sources.list.d/spotify.list
    1: deb http://repository.spotify.com stable non-free
  Active apt repos in: /etc/apt/sources.list.d/vivaldi.list
    1: deb [arch=amd64] https://repo.vivaldi.com/stable/deb/ stable main
Info:
  Processes: 304 Uptime: 1d 19h 37m wakeups: 1 Memory: 31.12 GiB used: 6.62 GiB (21.3%)
  Init: SysVinit v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12.2.0
  alt: 12 Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI

User avatar
CharlesV
Global Moderator
Posts: 7395
Joined: Sun Jul 07, 2019 5:11 pm

Re: When attaching a USB drive, prompted with "You are not authorized to mount this device."

#2 Post by CharlesV »

If this is an ntfs disk, then you may need to verify that fuse and ntfs-3g are installed.

And if it is ntfs, then can you manually mount it ( without sudo ) if you use the -t ntfs-3g parameter ?
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

bwhawk
Posts: 62
Joined: Mon Mar 19, 2018 8:26 am

Re: When attaching a USB drive, prompted with "You are not authorized to mount this device."

#3 Post by bwhawk »

The USB drive is formatted as ext4.

bwhawk
Posts: 62
Joined: Mon Mar 19, 2018 8:26 am

Re: When attaching a USB drive, prompted with "You are not authorized to mount this device."

#4 Post by bwhawk »

I think this may be a PolicyKit issue. When I attempt to run Disk Manager from the menu, nothing happens. When I run it from the command line via:

Code: Select all

/usr/bin/disk-manager-launcher
I get prompted for my password. Once I enter it, I get the message:

Code: Select all

polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie

User avatar
FullScale4Me
Posts: 1084
Joined: Fri Jan 08, 2021 11:30 pm

Re: When attaching a USB drive, prompted with "You are not authorized to mount this device."

#5 Post by FullScale4Me »

In MX Tweek, other tab: is 'Enable mounting of internal drives by standard users (no admin password required).' checked?

IIRC the system assumes all ext4 drives are owned by Root.
Michael O'Toole
MX Linux facebook group moderator
Dell OptiPlex 7050 i7-7700, MX Linux 23 Xfce & Win 11 Pro
HP Pavilion P2-1394 i3-2120T, MX Linux 23 Xfce & Win 10 Home
Dell Inspiron N7010 Intel Core i5 M 460, MX Linux 23 Xfce & KDE, Win 10

bwhawk
Posts: 62
Joined: Mon Mar 19, 2018 8:26 am

Re: When attaching a USB drive, prompted with "You are not authorized to mount this device."

#6 Post by bwhawk »

When I click on the checkbox and then click Apply, the checkbox becomes unchecked. I suspect this is symptomatic of the same problem. An application is requesting elevated privileges and not getting a response.

When I run 'sudo mx-tweak' from the command line, the checkbox stays checked after I click Apply. And that setting does allow Dolphin to mount and browse the USB drive without any prompts or errors. Which is quite nice, actually. I'm glad you mentioned that.

That doesn't address the underlying problem which seems to be with PolicyKit.

But it's now a moot point. I restarted the system, and now PolicyKit is working as it should. When I launch Disk Manager now, I get the usual message, "Authentication is required to proceed." And the title of the message window is "Authentication Required - PolicyKit1 KDE Agent".

The System Monitor also now shows two PolicyKit processes running, 'polkitd' and 'polkit-kde-authentication-agent-1'. Before, it was only showing polkitd.

So polkit-kde-authentication-agent-1 apparently stopped working at some point. A restart fixes it.

Danathar
Posts: 234
Joined: Fri Feb 14, 2020 11:49 am

Re: When attaching a USB drive, prompted with "You are not authorized to mount this device."

#7 Post by Danathar »

bwhawk wrote: Sat Dec 09, 2023 3:28 pm When I click on the checkbox and then click Apply, the checkbox becomes unchecked. I suspect this is symptomatic of the same problem. An application is requesting elevated privileges and not getting a response.

When I run 'sudo mx-tweak' from the command line, the checkbox stays checked after I click Apply. And that setting does allow Dolphin to mount and browse the USB drive without any prompts or errors. Which is quite nice, actually. I'm glad you mentioned that.

That doesn't address the underlying problem which seems to be with PolicyKit.

But it's now a moot point. I restarted the system, and now PolicyKit is working as it should. When I launch Disk Manager now, I get the usual message, "Authentication is required to proceed." And the title of the message window is "Authentication Required - PolicyKit1 KDE Agent".

The System Monitor also now shows two PolicyKit processes running, 'polkitd' and 'polkit-kde-authentication-agent-1'. Before, it was only showing polkitd.

So polkit-kde-authentication-agent-1 apparently stopped working at some point. A restart fixes it.
That's a rather interesting problem. Glad rebooting fixed it. I hate it when a problem like that is fixed on reboot and you have no idea why something stopped working ;)

Post Reply

Return to “MX Help”