1. Support arrow-right
  2. How do I fix a "permission denied" error from Docker?

How do I fix a "permission denied" error from Docker?

If Docker is giving you a "permission denied" error, it may be that the .docker folder and the .docker/json.config file is not owned by the current user.

Try this:

sudo chown $USER:docker ~/.docker
sudo chown $USER:docker ~/.docker/config.json
sudo chmod g+rw ~/.docker/config.json https://stackoverflow.com/a/39137415

When logging in to Docker to install ItemPath, you could get a message like this:

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

Usually, if there's an error at this step, this is a local user permission issue.

You could try to solve this issue by adding the current Linux user to the Docker user group using the following command:

sudo groupadd docker && sudo usermod -aG docker $USER

You may need to restart the machine after this step, but this should resolve the issue.

Resources

To learn more about ItemPath and see it in action, please book a demo with our sales team. In the meantime, here are some of our popular articles and key topics.