• locuester@lemmy.zip
            link
            fedilink
            English
            arrow-up
            45
            arrow-down
            3
            ·
            6 个月前

            Docker does by default - it only works if you use sudo. But the docs tell you to add yourself to the docker group (which requires sudo to do). Then running docker doesn’t require sudo anymore.

            • squaresinger@lemmy.world
              link
              fedilink
              arrow-up
              52
              ·
              6 个月前

              Yeah, that’s a terrible decision in the docs. Don’t ever add a path where anything on the shell can execute user-modifyable code as root.

              As soon as you do that, you lose any protection that comes from separating root users and non-root users. Because now any malicious program can just use docker to elevate its code to root.

          • Zikeji@programming.dev
            link
            fedilink
            English
            arrow-up
            27
            ·
            6 个月前

            Or don’t give your user docker and use sudo to use the docker CLI to get the same effect. Hell, you could even alias docker as sudo docker to get the same feel.

          • tabular@lemmy.world
            link
            fedilink
            English
            arrow-up
            9
            ·
            6 个月前

            Sudo can/usually does ask for password - but if you’re feeling lucky you can use sudo without a password.

            (Currently doing that after repeatedly failing to install an OS and have not yet felt compelled to change it back).

            • mkwt@lemmy.world
              link
              fedilink
              arrow-up
              1
              ·
              5 个月前

              Most systems I use will keep a sudo authentication session open for several minutes, so you don’t have to repeatedly enter your password on every single command.

              • tabular@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                5 个月前

                It’s a great feature - a necessary feature even. Tired using doas Linux port and that feature isn’t supported - it was depressing.

      • racemaniac@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        4
        ·
        6 个月前

        Suppose we all did read the docs. How possible is it with the complexity of a modern system to really take literally everything in account, and understand the implications oof everything to keep your system safe? It’s great that it’s documented, but if security isn’t the default option, it will lead to issues, and everything has become so complex, that imo correctly managing everything is literally impossible… This is a systemic issue, not a user issue.

        • Lemmert@reddthat.com
          link
          fedilink
          arrow-up
          1
          ·
          6 个月前

          I don’t think it would’ve been an issue if they just put a warning in the getting started section in the docs (or if they just have secure defaults to begin with). But currently there’s no mention of it. It took almost a year for me to realise that I was running “production ready code” in root