Bug 396526 - Unable to mount a device when another user is logged in.
Summary: Unable to mount a device when another user is logged in.
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Disks & Devices widget (other bugs)
Version First Reported In: 5.13.2
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: usability
: 429991 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-15 08:51 UTC by Franz Trischberger
Modified: 2021-05-07 17:48 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Trischberger 2018-07-15 08:51:15 UTC
user1 logged in at TTY1 with plasma session. Then user2 logs in on TTY2 (via action "change user" - user2 also on plasma). I then change to user1 and insert a USB device (sd card reader in this case). Trying to "open with file manager" just shows a spinning icon. user2 gets a notification that it requires the root password to mount the device. If I cancel that passwd-dialog it appears for user1 (that initially triggered the mount request). If I then cancel it also for user1 it seems I can access it without any issue - no further passwd-dialog is shown.
If I enter the password from within user2's session only user2 can access the mounted device, user1 receives the message "file or folder /run/media/user2/DEVICENAME does not exist" - Of course it exists but user1 doesn't have sufficient rights.

In my opinion if user1 inserts a device and requests access to the content it should be granted also if other users are logged in.
Furthermore the errormessage should show the correct message ("not sufficient rights" instead of "does not exist"). Giving the other users only read access could be possible, too - but that is probably a security issue, though we are talking of desktop machines - other users could just unplug that device as they have physical access.

====

As I have the passwords for both users I can workaround this issue. For "real" multi-user desktops the described behaviour of the device notifier makes it impossible to work with external devices.
Comment 1 Patrick Silva 2018-08-05 18:54:30 UTC
Same thing on Arch Linux, plasma 5.13.4.
Comment 2 Nate Graham 2020-11-25 00:02:17 UTC
Not sure this is a bug in the Device Notifier, but we may be able to at least present this issue to the user in a better way.
Comment 3 Nate Graham 2020-12-04 01:04:36 UTC
*** Bug 429991 has been marked as a duplicate of this bug. ***
Comment 4 postix 2020-12-04 10:24:09 UTC
(In reply to Nate Graham from comment #2)
> Not sure this is a bug in the Device Notifier, but we may be able to at
> least present this issue to the user in a better way.

I think there are to issues:

1) The device stays occupied even if the user logs out: You can see this when you log out of "A", log into "B" and back into "A", the device is still mounted and can be accessed.

2) The Plasma device Plasmoid should show that the device was mounted by someone else "A" and prevent the user "B" from unmounting it (in case user "A" does not log out but chooses to switch users)

3) The error notification should become more accurate and descriptive.
Comment 5 Nate Graham 2021-05-07 17:48:36 UTC
Stefan, do you know if it's possible to make mounted devices available for all users, or can we have one user take the device from another, or do we have to be content with just showing an error message in the applet in this situation?