Storage devices not unmounted when logging out - is this a bug?

Asked by turbolad

If there's more than one user account on Ubuntu and you log off with a storage device mounted e.g. a USB pendrive, it does not get unmounted. When the next user logs in, the storage device has to be unplugged then reconnected before Ubuntu allows the next user to access it.

Is this a bug? I've suggested it on Brainstorm and there's confusion over this. Is it actually a bug or an overlooked idea??????

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu udisks Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eliah Kagan (degeneracypressure) said :
#1

If multiple users are logged in at the same time, it makes sense that users who did not mount a device would not be able to access the device, so it doesn't seem like this is a bug. (Administrative users can access, unmount, and remount the device as they see fit; they must simply authenticate.)

It seems to me that Brainstorm is a good place to discuss this and explore ideas about alternative ways for this to work. If a very specific reason why this is clearly undesirable behavior can be articulated, then it would be a good idea to report it as a bug.

Revision history for this message
turbolad (turbolad995) said :
#2

Thank you for your reply Eliah Kagan.

For HOME users who share a desktop computer, with ONE user logged in at a time - and we must also take into account the option to “Switch From” - a feature which allows another user to login without the current user losing their session.

Assume we have 2 users “A” and “B”.

User A has connected a USB pendrive containing files. User B would like to use the computer and needs access to that same USB pendrive.

User A logs-out or selects “Switch From” - in the menu located in the top-right of the screen. User B logs-in and cannot access the USB pendrive; user B just sees a cryptic error message when trying to access it.

It would surely be EASIER if the pendrive (or any storage device) was always unmounted automatically when any user logs out - or uses the “Switch From” option - AND then it gets mounted automatically when the next user has logged in??????

Is this problem I'm describing a “feature” or is it a problem which needs to be thoroughly investigated? I'm confused!

Revision history for this message
Sam_ (and-sam) said :
#3

It's safe to actively unmount a device, maybe there're still some files written to it, e.g. backup running in background.
In case of introducing an automatic option I'd prefer opt-in rather than opt-out.
Although this shouldn't be trivial to manage.

Since a device doesn't care by nature who is using the pc, it's user and admin responsibility.
Whatever user (single or multi) needs to have permissions from admin to access the drive.
There is policykit and fstab.
http://hal.freedesktop.org/docs/PolicyKit/
https://help.ubuntu.com/community/Fstab

Can you help with this problem?

Provide an answer of your own, or ask turbolad for more information if necessary.

To post a message you must log in.