ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Fedora 31 Server, podman and SELinux

    IT Discussion
    5
    52
    4.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      Woti
      last edited by

      Heiho ๐Ÿ™‚
      I haven't seen your message yet. Now 1 month has passed ๐Ÿ˜„
      Your script starts Podman automatically at boot?

      Are you using Plex? I am using Kodi ๐Ÿ˜›

      stacksofplatesS 1 Reply Last reply Reply Quote 0
      • stacksofplatesS
        stacksofplates @Woti
        last edited by

        @Woti said in Fedora 31 Server, podman and SELinux:

        Heiho ๐Ÿ™‚
        I haven't seen your message yet. Now 1 month has passed ๐Ÿ˜„
        Your script starts Podman automatically at boot?

        Are you using Plex? I am using Kodi ๐Ÿ˜›

        Yeah I got it to work! Oh nice ๐Ÿ˜„

        1 Reply Last reply Reply Quote 0
        • W
          Woti
          last edited by

          Sounds good ๐Ÿ™‚ I'll try your solution and report.

          1 Reply Last reply Reply Quote 0
          • W
            Woti
            last edited by Woti

            Hei, I wanted to try your solution. Fรธrst, I wanted to run meg container setup but I get this error:

            systemctl --user status container-easyepg.service
            Failed to connect to bus: No such file or directory
            

            I haven't changed anything since the last time and the container file exists...
            I can start it in Cockpit but not in the console. Strange...

            I figured out: I need to issue the above command as user not as root.
            Is it wrong to issuer this command as user? I setted up podman to use easyepg as user not as root.
            Maybe that's why the container not starts during boot?

            Which podman owner are you using @stacksofplates : user or root?

            stacksofplatesS 1 Reply Last reply Reply Quote 0
            • stacksofplatesS
              stacksofplates @Woti
              last edited by

              @Woti said in Fedora 31 Server, podman and SELinux:

              Hei, I wanted to try your solution. Fรธrst, I wanted to run meg container setup but I get this error:

              systemctl --user status container-easyepg.service
              Failed to connect to bus: No such file or directory
              

              I haven't changed anything since the last time and the container file exists...
              I can start it in Cockpit but not in the console. Strange...

              I figured out: I need to issue the above command as user not as root.
              Is it wrong to issuer this command as user? I setted up podman to use easyepg as user not as root.
              Maybe that's why the container not starts during boot?

              Which podman owner are you using @stacksofplates : user or root?

              I'm using user but not that way. I put the service in /etc/systemd/system and set a user in the unit file. So I still start it with sudo systemctl restart plex but systemd uses the user defined in the unit file to run the service.

              W 1 Reply Last reply Reply Quote 0
              • W
                Woti @stacksofplates
                last edited by

                @stacksofplates said in Fedora 31 Server, podman and SELinux:

                @Woti said in Fedora 31 Server, podman and SELinux:

                Hei, I wanted to try your solution. Fรธrst, I wanted to run meg container setup but I get this error:

                systemctl --user status container-easyepg.service
                Failed to connect to bus: No such file or directory
                

                I haven't changed anything since the last time and the container file exists...
                I can start it in Cockpit but not in the console. Strange...

                I figured out: I need to issue the above command as user not as root.
                Is it wrong to issuer this command as user? I setted up podman to use easyepg as user not as root.
                Maybe that's why the container not starts during boot?

                Which podman owner are you using @stacksofplates : user or root?

                I'm using user but not that way. I put the service in /etc/systemd/system and set a user in the unit file. So I still start it with sudo systemctl restart plex but systemd uses the user defined in the unit file to run the service.

                Okay. I have mine in /home/user/.config... one or another hidden directory created by podman generate commando.
                Stupid question maybe: but what is the unit file?

                stacksofplatesS 1 Reply Last reply Reply Quote 0
                • stacksofplatesS
                  stacksofplates @Woti
                  last edited by

                  @Woti said in Fedora 31 Server, podman and SELinux:

                  @stacksofplates said in Fedora 31 Server, podman and SELinux:

                  @Woti said in Fedora 31 Server, podman and SELinux:

                  Hei, I wanted to try your solution. Fรธrst, I wanted to run meg container setup but I get this error:

                  systemctl --user status container-easyepg.service
                  Failed to connect to bus: No such file or directory
                  

                  I haven't changed anything since the last time and the container file exists...
                  I can start it in Cockpit but not in the console. Strange...

                  I figured out: I need to issue the above command as user not as root.
                  Is it wrong to issuer this command as user? I setted up podman to use easyepg as user not as root.
                  Maybe that's why the container not starts during boot?

                  Which podman owner are you using @stacksofplates : user or root?

                  I'm using user but not that way. I put the service in /etc/systemd/system and set a user in the unit file. So I still start it with sudo systemctl restart plex but systemd uses the user defined in the unit file to run the service.

                  Okay. I have mine in /home/user/.config... one or another hidden directory created by podman generate commando.
                  Stupid question maybe: but what is the unit file?

                  It's the .service file. They're called units because there's a handful of different types (service, timer, path, target, etc)

                  1 Reply Last reply Reply Quote 1
                  • W
                    Woti
                    last edited by

                    Finally I found the solution here on github: https://github.com/containers/libpod/issues/5494

                    I used podman v1.8.0 this time I generated the easyepg.service file with podman generate. There was a bug in this version which not generated default.target. In later version it is fixed. Now it is working ๐Ÿ™‚

                    [Install]
                    WantedBy=multi-user.target default.target
                    
                    stacksofplatesS 1 Reply Last reply Reply Quote 1
                    • stacksofplatesS
                      stacksofplates @Woti
                      last edited by

                      @Woti said in Fedora 31 Server, podman and SELinux:

                      Finally I found the solution here on github: https://github.com/containers/libpod/issues/5494

                      I used podman v1.8.0 this time I generated the easyepg.service file with podman generate. There was a bug in this version which not generated default.target. In later version it is fixed. Now it is working ๐Ÿ™‚

                      [Install]
                      WantedBy=multi-user.target default.target
                      

                      Ah ok. I don't use the generate hardly ever because it kind of defeats the purpose of a container. It hard codes the hash for the container instead of a name for some reason.

                      1 Reply Last reply Reply Quote 0
                      • W
                        Woti
                        last edited by

                        I see ๐Ÿ™‚ I haven't tried your solution yet. But I did read about your kind of solution on Redhat Access sites.
                        The case with default.target is that, if podman containers runs as user they have no access on multi-user.target through systemd. If I did understand right ๐Ÿ˜„ That's why you have to use default.target instead.

                        I'll try your solution in a VM soonly.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 3 / 3
                        • First post
                          Last post