[SOLUTION] mount internal partitions - permission problem

Here you'll find a place for solutions and hints.

Please use one of the support subforums below for questions or if you have any issues and need support.

Re: auto mount of partitions

Postby doktor5000 » Aug 4th, '11, 18:56

You deleted the config file and reinstalled policykit?
./dexter11 --verbose --more-details-on-last-post :)

What about:
Code: Select all
id       <- run as user under which you want the mounting to work
cat /etc/polkit-1/localauthority/50-local.d/90-csaba-local-authentication.pkla
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: auto mount of partitions

Postby ahmad » Aug 5th, '11, 14:49

/etc/polkit-1 is owned by the polkit package.

@dexter, what happens exactly when you try mounting an internal HDD partition?
ahmad
 
Posts: 336
Joined: Mar 22nd, '11, 20:18
Location: Egypt

Re: auto mount of partitions

Postby doktor5000 » Aug 5th, '11, 15:30

ahmad wrote:/etc/polkit-1 is owned by the polkit package.


Well, yes ... ? The configuration file stays in place, at least with --replacepkgs, tested that here.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: auto mount of partitions

Postby ahmad » Aug 5th, '11, 15:58

I don't think /etc/PolicyKit/PolicyKit.conf has anything to do with polkit.

Code: Select all
$ ps aux | grep polkitd
root      2211  0.0  0.2 186104  5116 ?        Sl   13:28   0:00 /usr/lib64/polkit-1/polkitd
$ rpm -qf /usr/lib64/polkit-1/polkitd
polkit-0.101-5.mga2
ahmad
 
Posts: 336
Joined: Mar 22nd, '11, 20:18
Location: Egypt

Re: auto mount of partitions

Postby doktor5000 » Aug 5th, '11, 16:15

Uhh, well:

Code: Select all
[doktor5000@mageia1 ~]$ rpm -qf /etc/PolicyKit/PolicyKit.conf
policykit-0.9-8.mga1


dexter11 said he changed it, and then GNOME crashed,
so i thought it would be a wise thing to rule out these changes first, no?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: auto mount of partitions

Postby ahmad » Aug 5th, '11, 16:33

IIRC, GNOME (and Nautilus) switched to polkit even before KDE4...
ahmad
 
Posts: 336
Joined: Mar 22nd, '11, 20:18
Location: Egypt

Re: auto mount of partitions

Postby doktor5000 » Aug 6th, '11, 09:33

polkit, PolicyKit, i can't distinguish them. I thought these were 2 names for the same programs.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: auto mount of partitions

Postby dexter11 » Aug 6th, '11, 15:20

doktor5000 wrote:You deleted the config file and reinstalled policykit?
./dexter11 --verbose --more-details-on-last-post :)
Yes I did. And thanks to the reinstalling now the default PolcyKit.conf is back.
What about:
Code: Select all
id       <- run as user under which you want the mounting to work
cat /etc/polkit-1/localauthority/50-local.d/90-csaba-local-authentication.pkla


Code: Select all
$ id
uid=500(csaba) gid=500(csaba) csoportok=500(csaba)

csoportok means groups

Code: Select all
# cat /etc/polkit-1/localauthority/50-local.d/90-csaba-local-authentication.pkla
[Local Authentication]
Identity=unix-user:csaba
Action=org.freedesktop.udisks.filesystem-mount-system-internal
ResultActive=yes
dexter11
 
Posts: 13
Joined: Jul 4th, '11, 16:11

Re: auto mount of partitions

Postby dexter11 » Aug 6th, '11, 15:54

ahmad wrote:/etc/polkit-1 is owned by the polkit package.

@dexter, what happens exactly when you try mounting an internal HDD partition?

I write down the whole process in case it makes a difference.
So first I start diskdrake, click on the partition I want to unmount and then click on unmount. I realize it must be the same as writing umount on the command line but I prefer GUIs these days.
I leave diskdrake running and then launch Nautilus. Click on the recently unmounted partition and this is what I get:
Image

Before I made any modifications to any file Nautilus asked for the root password instead of just giving an error message.
dexter11
 
Posts: 13
Joined: Jul 4th, '11, 16:11

Re: auto mount of partitions

Postby doktor5000 » Aug 6th, '11, 16:30

Now this is another problem: IIRC, you can't have it both ways, either you use fstab entries, or you use dynamic mounting by means of your desktop environment.
Could you backup your current fstab, remove the entries for the partitions you want to mount, and try again and show the error message?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: auto mount of partitions

Postby ahmad » Aug 6th, '11, 17:01

Yep, udisks (and hal) won't/can't mount partitions that have /etc/fstab entries.
ahmad
 
Posts: 336
Joined: Mar 22nd, '11, 20:18
Location: Egypt

Re: auto mount of partitions

Postby dexter11 » Aug 7th, '11, 15:11

Removed all those partitions from fstab and when I click on them Nautilus mounts them without any error messages or authentications. Hurray!

Now how can I setup the system so it does the mounting of these partitions automatically at boot or when Gnome starts?
dexter11
 
Posts: 13
Joined: Jul 4th, '11, 16:11

Re: auto mount of partitions

Postby doktor5000 » Aug 7th, '11, 15:28

Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: auto mount of partitions

Postby dexter11 » Aug 9th, '11, 16:32

Actually udisks doesn't automatically mount anything
So it's not possible.

Thank you for all your help.
dexter11
 
Posts: 13
Joined: Jul 4th, '11, 16:11

Re: auto mount of partitions

Postby doktor5000 » Aug 9th, '11, 18:37

Well, that is wrong, your quoting misses the important part:

Actually udisks doesn't automatically mount anything - the way it works
is that the desktop session is responsible for deciding if a mountable
filesystem is to be automatically mounted
. It sounds really easy to do
this but experience has shown that you need to be very careful.

Anyway, for GNOME, Nautilus is in charge of that. Nautilus basically, on
startup and when a new GVolume is announced, just checks the result of
g_volume_should_automount()
[...]


But i'm not into Nautilus, and i'm not sure this can be done without changing some source
code. I also don't know where to change these settings, as i don't use GNOME.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: auto mount of partitions

Postby dexter11 » Aug 10th, '11, 18:43

I checked the links in that mail and two of them points to C source code. So I assume that if I want to achieve automount with PolicyKit and udisks then I should fix the source and recompile. That just won't happen. It's much easier to create and use fix mount points.
dexter11
 
Posts: 13
Joined: Jul 4th, '11, 16:11

Re: auto mount of partitions

Postby doktor5000 » Aug 10th, '11, 19:12

Well, my logic tells me if there is a flag called "volume_should_automount" then there SHOULD
be a way for the user to specify this for some of his volumes. For example in KDE you can switch
automounting on for all removable media. or only for media that were already connected to your box
or only for specific ones.

That should also be doable in GNOME, but i don't know that. Some GNOME user must help you there.
If not, i'm installing GNOME right now and looking after this, you got me interested.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: auto mount of partitions

Postby jaywalker » Mar 18th, '12, 23:22

oops, posted in wrong place
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: [SOLUTION] mount internal partitions - permission proble

Postby doktor5000 » Dec 14th, '14, 20:21

FWIW, someone put the policy file content in the wiki: https://wiki.mageia.org/en/Useful_polki ... t_password
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Previous

Return to The magician suggests...

Who is online

Users browsing this forum: No registered users and 1 guest

cron