No Deployment Permissions
Symptoms
Case 1: The error message connect: permission denied is displayed.
Case 2: An error message is displayed, indicating that the user does not have permissions to access /etc/docker/daemon.json:.
Cause Analysis
Only the root user and users in the Docker user group are allowed to perform operations on Docker.
Solution
- Add the user to the Docker user group.
- Log in to the server using a user account with the sudo permissions, for example, testuser.
- Check whether the Docker user group exists.
sudo cat /etc/group | grep docker
- If so, add the user to the Docker user group.
sudo usermod -aG docker testuser
- If not, create a Docker user group and add the user to the group.
sudo groupadd docker sudo usermod -aG docker testuser
- If so, add the user to the Docker user group.
- Exit the server. Then, log in to the server again and check whether the user can run the Docker command.
docker info
- If another error message, indicating that the user does not have permissions to access /var/run/docker.sock, is displayed, modify the permissions for /var/run/docker.sock.
sudo chmod a+rw /var/run/docker.sock
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.