Permission denied while trying to connect to the Docker daemon socket

When trying to connect to a new portainer in a new docker environment on a new fedora server 32 host on a server whose network card is not supported by debian - thats why Fedora.

Failure

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/_ping: dial unix /var/run/docker.sock: connect: permission denied

This is all local network, no firewall running, no SELinux running.
Copy pasted the installation command form https://www.portainer.io/installation/ top most section.

Hi @SecCon,

did you run portainer with non-root user? If yes you can add your user to docker group.

below is step to create group docker:

  1. create group docker first $ sudo groupadd docker
  2. add your user to docker group $ sudo usermod -aG docker $USER
  3. log out and log back in so that your group membership is re-evaluated.
  4. try again to run portainer with your user.

Actually I got around that, now I have a working portainer installation but … I guess from above I need to add a user to docker, which is something I never really thought about before.

I did run the installation as root, but cant login with root, will you commands above solve that?

FYI base system is
HPE Proliant > Fedora Server 32 > Webmin & Docker + Portainer.
I use Webmin for server administration and works really well.