I have added myself to the docker group using command sudo usermod -aG docker yashar. and here is the output of groups yashar:
yashar : yashar adm cdrom sudo dip plugdev lpadmin sambashare docker
and here is the output of ls -lah /var/run/docker.sock:
srw-rw---- 1 root docker 0 Apr 8 11:16 /var/run/docker.sock
but when I run docker run hello-world I get this error:
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
But running sudo docker run hello-world works without any problems.
Is there anything I'm missing? How can I solve this? I'm using ubuntu 18.04