After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 574566 - Handling of automounted media after user logs out
Handling of automounted media after user logs out
Status: RESOLVED NOTGNOME
Product: nautilus
Classification: Core
Component: general
2.24.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-08 17:26 UTC by Julien Valroff
Modified: 2012-09-17 20:43 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Julien Valroff 2009-03-08 17:26:43 UTC
Please describe the problem:
When a user logs out after some removable media have been automounted, they cannot be unmounted by other users logged in.

Note that I have applied the fix to http://bugzilla.gnome.org/show_bug.cgi?id=573577 to the Debian experimental package

Steps to reproduce:
1. User 1 has an active session and inserts a removable media
2. the removable media is automounted and user 1 gets the ownership
3. User 2 logs in and switch to his session using eg. f-u-s-a 
4. User 1 returns to his session and logs out

Actual results:
Removable media are still mounted in user 2 session but cannot be unmounted

Expected results:
Not sure of what is expected. Unmounting the removable media when user 1 log out is to be excluded as user 2 could be working on files present on these removable media.

Ownership should hence be passed to another user. The question is to which user (in case more than 2 users are involved)?

A Debian user proposed that the user loggin out gets asked to whom he wants the ownership to be passed. I don't know if that's a workable solution but have no other idea.

Does this happen every time?
Yes

Other information:
It is very important to solve this as it renders user switching almost useless when removable media are involved.
Comment 1 David Zeuthen (not reading bugmail) 2009-03-16 16:46:14 UTC
With DeviceKit-disks (the replacement for HAL), there's a way to unmount filesystems mounted by other users. It requires some extra privilege (using PolicyKit, typically asks for the root password). 

Also, with GNOME 2.28, we will switch to DeviceKit-disks as the default backend for GVfs. 

So with GNOME 2.28 this should be a lot easier.

(That said, I wonder... is passing ownership really that important? I mean, f-u-s is pretty rare in the first case; it's even more rare to use removable media when doing it.)

Regarding unmounting on log-out, this need to be handled at the system level; we simply cannot rely on the session doing this itself. I will probably make DeviceKit-disks do this... (I'll follow up with a bug reference to the DeviceKit-disks bug tracker).
Comment 2 David Zeuthen (not reading bugmail) 2009-03-16 16:51:17 UTC
Here's the DeviceKit-disks bug

http://bugs.freedesktop.org/show_bug.cgi?id=20691
Comment 3 William Jon McCann 2012-09-17 20:43:11 UTC
As David says, I don't think there is a nautilus bug here. Cleaning up the session mounts on logout seems like the right approach to me.