USB disks and SD cards mount for wrong user

Bug #1930312 reported by Chris
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
caja (Ubuntu)
Invalid
Undecided
Unassigned
gvfs (Ubuntu)
Confirmed
Undecided
Unassigned
udisks2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have MATE 20.04 LTS installed on a laptop with 4 users. Plugging in SD cards and USB sticks works perfectly, unless there is someone else logged in on the machine.
eg:
1- user A logs in, then walks away and screen locks
2- user B switches to the login screen and logs in as user B
3- user B plugs in a USB stick, but it doesn't mount for user B
4- (hidden from sight) user A gets an "authentication is required to mount... /dev/sdb1" error and the window is asking for admin password
- details of this are:
polkit.subject-pid: 102318
polkit.caller-pid: 806
Action: org.freedesktop.udisks2.filesystem-mount-other-seat
Vendor: The Udisks Project

user B has no indication on why it didn't mount. If they click on the USB stick in the Caja side bar, they get an "Unable to mount USB Disk - an operation is already pending"

So it seems that automount is trying to show the USB stick to the inactive user A, totally blocking user B. (user B doesn't even get the chance to enter an admin password to override)

the only solution is basically to "switch account", log in as user A and log them out.
(this clearly doesn't work if user B doesn't know their password!)

Tags: focal
Norbert (nrbrtx)
tags: added: focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gvfs (Ubuntu):
status: New → Confirmed
Changed in udisks2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Gordon N. Squash (thesquash) wrote :

For the record, this is not specific to Ubuntu or Ubuntu MATE at all -- I see this on Gentoo regularly, for example. It seems to be caused by a race condition in Caja and UDisks which didn't appear until UDisks started mounting volumes under user-specific subdirectories of `/media` -- so for example `user1` has volumes mounted under `/media/user1` and `user2` has volumes mounted under `/media/user2`. In ye olden days, `user1`'s UDisks-utilizing process (such as Caja) would mount the volume; `user2`'s instance of Caja would wait for the volume to get mounted by `user1`'s Caja, then open the shared mountpoint at `/media/[volume]`. Nowadays this doesn't work in any case, since `user1` puts in the request to mount the volume first and the volume is mounted under `user1`'s private mount directory -- `/media/user1/[volume]`. I'm not sure how to fix this yet, though. Maybe (but just a WAG) UDisks needs some kind of integration with the display manager or logind?

Revision history for this message
Chris (chrisonbuntu) wrote :

Thanks Gordon, I can remember seeing the issue when running Linux Mint back at version 17 - can't remember if it was under MATE (Caja) or Cinnamon (nemo).

Can we as udisk to mount physical media in /media/[volume] and not in the user-specific sub folders? For local users, that would be totally acceptable (and even useful) to be able to share access to USB sticks while plugged in.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in caja (Ubuntu):
status: New → Confirmed
no longer affects: ubuntu-mate
Changed in caja (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.