Bug 318068 - KDE mounts devices as root instead of as user
Summary: KDE mounts devices as root instead of as user
Status: RESOLVED INTENTIONAL
Alias: None
Product: frameworks-solid
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-08 22:36 UTC by Nikos Chantziaras
Modified: 2017-07-23 14:49 UTC (History)
6 users (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 Nikos Chantziaras 2013-04-08 22:36:47 UTC
In older KDE versions (I think 4.9, but perhaps it was 4.8) when I clicked on a mountable device icon, for example in Dolphin (but in general everywhere where such icons are offered), the device was mounted immediately without asking me for a root password.

Now, this doesn't work anymore. I now get prompted for the root password and the mount happens as root.

As a workaround, I now have to mount from the command line which is a hasstle since I prefer using desktop environments instead of the CLI.

Here's an fstab entry for a disk where KDE behaves wrongly:

/dev/sdb1         /windows/D        ntfs-3g  relatime,user,exec,norecover,windows_names,noauto  0 0

Note the "user" option, which allows the filesystem to be mounted by users.

Reproducible: Always




Kernel 3.8.6
NTFS-3G 2013.1.13
Comment 1 Alex Fiestas 2013-07-28 22:48:39 UTC
KDE is not mounting anything indicated in fstab, we only use fstab to know when cifs/nfs filesystems are mounted, but we NEVER use fstab information to perform any mounting.

So this must be an issue down in your distribution, definitively not in kde.

Also, for user-mounting we use UDisk1 and UDisk2, maybe that line in fstab is interfering with them, you shouldn't need any fstab line afaik to do user-mounting.

Going to close the bug as downstream. Please if you think I'm mistaken feel free to reopen the bug !

Thanks for reporting.
Comment 2 Johannes Huber 2013-08-01 21:06:15 UTC
What should downstream provide to not mount the drive/partion as root?
Comment 3 Johannes Huber 2013-10-24 17:40:08 UTC
(In reply to comment #2)
> What should downstream provide to not mount the drive/partion as root?

Could you please explain me what is needed in downstream?
Comment 4 Nikos Chantziaras 2014-06-07 16:44:29 UTC
Ping?

Can someone explain what KDE needs in order to mount devices with current user rights instead of root?
Comment 5 Nikos Chantziaras 2014-08-06 10:40:36 UTC
Hello?
Comment 6 Nikos Chantziaras 2014-08-06 10:41:49 UTC
Since no one's telling us why it's our (Gentoo) fault, I'm reopening.
Comment 7 Nikos Chantziaras 2015-02-15 15:13:55 UTC
It's been two years now, and still no one from KDE can tell us what it needs.

:-/
Comment 8 Jonathan Riddell 2015-03-11 19:08:10 UTC
This bug is reported on libsolid which is the kdelibs4 version of the solid library.  It is now in maintenance mode.  If you think it should still be fixed in the KDE Frameworks 5 version of solid please move it to or report a bug on frameworks-solid.
Comment 9 Johannes Huber 2015-06-21 15:14:36 UTC
Tested with current git version (DolphinAbout Dialog: KDE Frameworks 5.12.0 and 14.12.95), same result as in bug description.

If this is an downstream issue please decribe what is needed to make this work without /etc/fstab entry.
Comment 10 Lukas Ba. 2017-01-18 14:39:57 UTC
The decision about what needs root is done by polkit. Using polkit's defaults, mounting an
* Internal hard drives needs root

* External hard drives does not need root
This is on purpose.

See https://wiki.archlinux.org/index.php/Polkit for how to configure polkit.

If you want to see more examples just check out
/etc/polkit-1/
and
/usr/share/polkit-1/
on an Ubuntu installation.
Comment 11 Nikos Chantziaras 2017-07-23 04:28:49 UTC
Closing. I don't care anymore.
Comment 12 zless 2017-07-23 14:49:37 UTC
Polkit will misbehave with /proc mounted with hidepid=2 option.

I've been recently been bitten by this, maybe it helps.