polkit-org / polkit

polkit (formerly PolicyKit) is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes.
Other
51 stars 30 forks source link

Mounting external drive w/o pass authentication #196

Closed polkit-github-migration-bot closed 9 months ago

polkit-github-migration-bot commented 1 year ago

In gitlab.freedesktop.org by AngryPhantom on Apr 13, 2023, 13:10

Link to the original issue: https://gitlab.freedesktop.org/polkit/polkit/-/issues/195

Current behaviour, description of the problem

It's more a question. Though it may also be an issue.

I cannot mount my external drive without password authentication for some reason. I'm using an arch-based distribution (Artix Linux).

The distro uses /etc/polkit-1/rules.d/99-artix.rules:

polkit.addRule(function(action, subject) {
    if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) {
        return polkit.Result.YES;
    }
});

The strangest part that it works on another (older) installation of Artix, but not on a fresh one. Both HDDs are ext4 and connected via SATA. Package versions are the same everywhere. I've tried every (seems so) possible variant out there (different kernels, downgrading polkit, different rules syntax etc.), but to no avail. I have polkit and polkit-gnome installed.

I also understand that it could be this distro's specific issue and not polkit. I just can't figure out what I'm missing.

Reproducer

I dunno, probably install the latest Artix ISO.

Detailed description

Version of polkit: 122-1

Version of polkit-gnome: 0.105-10

Version of OS: Artix Linux, kernel branches 5.15 and 6.1

Thank you in advance.

polkit-github-migration-bot commented 1 year ago

In gitlab.freedesktop.org by AngryPhantom on Apr 15, 2023, 19:52

Sorry guys, my /etc/polkit-1/rules.d/ directory's permissions were somehow messed up. Reinstalled polkit and it got fixed.