Bug 129536 - post-3.5.3 regression: media can't mount devices without /etc/fstab entry
Summary: post-3.5.3 regression: media can't mount devices without /etc/fstab entry
Status: RESOLVED NOT A BUG
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: media (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kevin Ottens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-21 03:12 UTC by Christopher Martin
Modified: 2006-08-26 18:14 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Martin 2006-06-21 03:12:50 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          GCC 4.1.x 
OS:                Linux

I'd like to report a media device handling regression that has been introduced in SVN since 3.5.3 - probably by the merged branch.

KDE used to be able to mount/unmount devices without a corresponding /etc/fstab entry. It simply created its own mount point under /media and mounted the device. This no longer seems to happen, as I discovered when after building a branch pull I couldn't mount anything. Adding old-fashioned /etc/fstab entries and creating the appropriate directory under /media resolved this, but I shouldn't have to do this - not every distro has some magical daemon to auto-create fstab entries and pre-made mount points under /media. I've already had complaints from fellow users testing the latest SVN themselves, so this change will bite people.

The media system should check for a fstab entry if available, and if not fall back to just mounting it under /media with sensible defaults, like before.

Thanks!
Comment 1 Thiago Macieira 2006-06-28 19:27:52 UTC
You cannot mount something if you're not root and if there's no entry in /etc/fstab with the "user" option.
Comment 2 Christopher Martin 2006-06-30 21:08:38 UTC
OK, that's sensible and all, but I do like being able to fall back to the 3.5.3 behaviour, in which if an entry for a drive did not exist in /etc/fstab, KDE would simply make one, and proceed.

To alter this behaviour in a stable branch is just going to annoy a lot of users for whom media:/ worked fine since 3.4 (with no fstab entries).
Comment 3 Kevin Ottens 2006-06-30 21:11:45 UTC
Please provide your HAL, DBUS and pmount version. I'd also need to know which distribution you're using.
Comment 4 Christopher Martin 2006-06-30 23:41:20 UTC
I'm running Debian Sid (a.k.a "unstable"), which at the moment has pmount 0.9.11, dbus 0.62, and hal 0.5.7.

I'm happy to help further, so let me know if there's anything more I can do, or if you need more info on Debian's Utopia stack.

Thanks.
Comment 5 Kevin Ottens 2006-07-01 16:42:12 UTC
Do you have the hal-system-storage-* scripts in /usr/share/hal/scripts ?

If not that's a packaging issue coming from Debian (found the same one on Ubuntu).
Comment 6 Christopher Martin 2006-07-01 23:53:29 UTC
I have:

hal-system-storage-cleanup-mountpoint
hal-system-storage-cleanup-mountpoints
hal-system-storage-eject
hal-system-storage-mount
hal-system-storage-unmount

in /usr/share/hal/scripts.
Comment 7 Kevin Ottens 2006-07-10 18:35:09 UTC
I received a mail privately about this one. It's caused by HAL default config in Debian Sid that doesn't allow the user to mount volumes. Change the default security in /etc/dbus-1/system.d/hal.conf to solve this. Obviously Debian packagers patch this file since it's not the default policy provided by HAL.
Comment 8 Christopher Martin 2006-07-10 21:05:56 UTC
Debian only disables the mounting of volumes for systems using pam_console, which Debian doesn't use by default anyway. So for non pam_console distros, the default hal.conf does not allow volume mounting.

Of course, Debian could patch hal.conf to allow users of a certain group to mount volumes, and I've requested this change, but we'll see how far that goes.   It does seem that my initial complaint - that changes will have to be made by users/non-KDE packagers, etc. in a point release - is still valid to an extent.

What distro are you using, out of curiosity?
Comment 9 Kevin Yager 2006-08-07 20:05:54 UTC
I can confirm this with Kubuntu 6.06 LTS. A fresh install uses KDE 3.5.2 and the behavior is "proper": a USB key is automatically mounted, given an icon on the desktop, etc.

However if KDE is upgraded, then the behavior is broken. A Konqueror pops up with error:
"An error occurred while loading media:/sda1
The file or folder media:/sda1 does not exist"

(However the drive still mounts to /media/sda1, but no desktop icon appears and the above error appears.)
Comment 10 Fabio Erculiani 2006-08-26 18:12:27 UTC
Most people want the previous behavior. The distro makers already use hal.conf to specify the right policy. For example, in gentoo, a user can mount/umount non-removable partitions if he/she is in the plugdev group.
Comment 11 Fabio Erculiani 2006-08-26 18:14:48 UTC
I think that you should re-open this bug...