Home » [Solved]Got permission denied while trying to connect to the Docker daemon socket

[Solved]Got permission denied while trying to connect to the Docker daemon socket

Let’s start the discussion about [Solved]Got permission denied while trying to connect to the Docker daemon socket in following methods.

Got permission denied while trying to connect to the Docker daemon socket

Run the below command to solve the issue.

sudo chmod 666 /var/run/docker.sock

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

If you are facing the above issue then run the below command to solve it.

sudo usermod -aG docker ${USER}

I hope the strategies listed above work for you. Happy coding and come back again.

Similar Post : How to remove angular cli