FlatPak (FlatHub) Application Installation - Destination Folder Path

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Royi
Level 2
Level 2
Posts: 67
Joined: Fri Aug 11, 2017 8:55 am

FlatPak (FlatHub) Application Installation - Destination Folder Path

Post by Royi »

Hello,
My preferred installation of applications is using FlatPak (FlatHub).

Yet there is something strange.
I use Software Manager to install FlatPak and it installs them on /var/lib/flatpak/app/ which is system wide folder.
The strange thing is Software Manager doesn't ask for Root Password to do so while for installation of other applications (Which goes system wide) it does.

What's going on here?

I'm on Linux Mint 18.3.

Thank You.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29611
Joined: Wed Jul 06, 2011 3:58 am

Re: FlatPak (FlatHub) Application Installation - Destination Folder Path

Post by xenopeek »

Flatpak uses polkit. Polkit (policy kit) is similar to sudo and gksudo in that it is a way to run a program with higher privileges but it offers a much finer level of control. As I read the policy file for Flatpak, normal users do not need authentication to install signed applications from signed repositories.
Image
Royi
Level 2
Level 2
Posts: 67
Joined: Fri Aug 11, 2017 8:55 am

Re: FlatPak (FlatHub) Application Installation - Destination Folder Path

Post by Royi »

@xenopeek,
Could you show how do you understand that from the PolicyKit Files?

Thank You.
User avatar
xenopeek
Level 25
Level 25
Posts: 29611
Joined: Wed Jul 06, 2011 3:58 am

Re: FlatPak (FlatHub) Application Installation - Destination Folder Path

Post by xenopeek »

In the file /usr/share/polkit-1/actions/org.freedesktop.Flatpak.policy I find this snippet:

Code: Select all

  <action id="org.freedesktop.Flatpak.app-install">
    <!-- SECURITY:
          - Normal users do not need authentication to install signed applications
            from signed repositories, as this cannot exploit a system.
          - Paranoid users (or parents!) can change this to 'auth_admin' or
            'auth_admin_keep'.
     -->
I'm not sure about the rest of the file but if you're saying you don't need to provide your password to install Flatpaks, that seems to align with that comment.
Image
Royi
Level 2
Level 2
Posts: 67
Joined: Fri Aug 11, 2017 8:55 am

Re: FlatPak (FlatHub) Application Installation - Destination Folder Path

Post by Royi »

Actually if you read the XML fields you;d see it requires Admin Auth.

I think it is in the other file which grants it permission.
User avatar
xenopeek
Level 25
Level 25
Posts: 29611
Joined: Wed Jul 06, 2011 3:58 am

Re: FlatPak (FlatHub) Application Installation - Destination Folder Path

Post by xenopeek »

You mean the /usr/share/polkit-1/rules.d/org.freedesktop.Flatpak.rules file? Yes you may be right. I'm not yet that deep into Flatpak configuration :) It looks to say if you're active & local user in sudo group, in waives your need to authorize with password (you could because you're in sudo group, but you don't because you're active & local user + above comment from the policy file).
Image
Locked

Return to “Software & Applications”