Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2nd internal HDD mounting in Dolphin as root only
03-29-2018, 01:11 PM
Post: #1
2nd internal HDD mounting in Dolphin as root only
Hello,

I have a 2nd internal HDD for data only. This HDD is connected via SATA, hence the system detects it as an internal drive. Indeed, it shows up as expected as an unmounted drive in the Devices List on the left panel in the file manager Dolphin.

The goal is to mount / unmount that HDD not automatically on boot, but manually via Dolphin whenever it is needed.

Therefore, I made an entry in fstab for that HDD with its UUID, the desired mountpoint "/mnt/Data", ext4, and parameters "defaults,noauto,noatime,users". Moreover, I changed the ownership of the mountpoint to the standard user by "chown <user> /mnt/Data" and set the permissions accordingly by "chmod u+rwx,go+r -R /mnt/Data".

However, when I click on that HDD in the devices List on the left panel in the file manager Dolphin, it asks for root privileges. Angry

Please, what shall I do to get that HDD mounted as normal user?

Thanks in advance.

Kind regards,

Poseidon
Find all posts by this user
Quote this message in a reply
03-29-2018, 02:20 PM (This post was last modified: 03-29-2018 03:42 PM by leszek.)
Post: #2
RE: 2nd internal HDD mounting in Dolphin as root only
Please use the disk-manager utility to create a correct fstab entry and remove the one you added manually.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-29-2018, 02:49 PM
Post: #3
RE: 2nd internal HDD mounting in Dolphin as root only
(03-29-2018 02:20 PM)leszek Wrote:  Please use the disk-manager utility to create a correct fatal entry and remove the one you added manually.

I removed the manual entry in the fstab and used the disk-manager instead. There, I edited the settings to "defaults,users,noauto". After reboot, the same annoyance: Dolphin claims for root privileges to mount that drive. Sad
Find all posts by this user
Quote this message in a reply
03-29-2018, 03:58 PM
Post: #4
RE: 2nd internal HDD mounting in Dolphin as root only
Ah sorry. I missed that you explcitely don't want to have it automount. In that case skip disk-manager and remove all the fstab stuff (as it is only really useful for permanent mounts).

Instead you need to tell policykits configuration to allow normal users in the storage group to mount internal systems without extra privileges.

To do this you need to edit the policykit configuration file in /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy and change line 163 (section action id="org.freedesktop.udisks2.filesystem-mount-system") from auth_admin_keep to yes.
So this line looks like this:
Code:
<allow_active>yes</allow_active>

Hope that helps.

edit: Moved to correct subforum.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-29-2018, 06:03 PM
Post: #5
Smile RE: 2nd internal HDD mounting in Dolphin as root only
Hello Leszek,

thank you very much. Smile

It seems to work. Via the disk-manager, I changed the fstab parameter back to "noauto" again and set the mountpoint to "/mnt/Data". After reboot, the HDD was listed as desired unmounted in Dolphin and could be mounted / unmounted by the normal user.

Question: Will the modification made in "/usr/share/polkit-1/actions/org.freedesktop.udisks2.policy" survive future system updates? In "https://wiki.ubuntuusers.de/PolicyKit/" it is written that files in the concerned folder will be overwritten upon package updates. If so, may you please give me advise where and how to implement a persistent setting.

Idea I wonder how an "average user" shall know that solution? I would rather have expected a more versatile settings menue in the disk-manager, where I could grant the mounting / unmounting rights for a given partition to users / groups. Surprising that this is not (yet) implemented in the - otherwise very detailed - KDE system setting interface.

Thanks again in advance and best regards,

Poseidon
Find all posts by this user
Quote this message in a reply
03-29-2018, 07:45 PM
Post: #6
RE: 2nd internal HDD mounting in Dolphin as root only
only an update of udisks2 could potentially overwrite that change. But by default even a package update will detect the modified file and not overwrite that then but install the file in the new package with a suffix of .new

Policykit configuration is indeed not implemtned in disk-manager as this application was written way before policykit came up and never was updated for this.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-29-2018, 09:44 PM
Post: #7
RE: 2nd internal HDD mounting in Dolphin as root only
Hello Leszek,

thank your very much for your competent and prompt help!

Kind regards,

Poseidon
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)