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

I’ve been looking to try Artix Linux which doesn’t contain Systemd, So I decided to have a look at Docker on my current OS cause a few programs I do use and require Systemd are available as a Docker container. I installed Docker, installed Hello World and got exactly what I should have. I just did a search for Emby and get the below. I’m running Garuda Gaming(Arch based)with the Plasma desktop. Any idea what is going on? Thanks

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.24/images/search?limit=25&term=emby": dial unix /var/run/docker.sock: co
nnect: permission denied

Looks like a permission issue to the docker.sock.

list group ids of current user: id --groups
show uid:gid of docker.sock: stat /var/run/docker.sock --format '%u:%g

If the gid of the second command is not present in the list of gids from the first command, you either need to perform your tasks as root or add your user to the group you saw in the second command.

In the below scenario, how to get rid with permission denied error
image

The condtion in the first part of the sentence is true, so by doing what is written in the second part of the sentence you can get rid of the permission denied error. If you lack the exact command to add a group to a user, a short google search on “{whatever your os and version is} add group to user” should give you plenty of examples.