Docker socket permission errors mean the current user or process cannot talk to the Docker daemon.
Symptoms
- docker ps returns permission denied.
- CI job cannot access /var/run/docker.sock.
- Commands work with sudo but not as the normal user.
Likely causes
- User is not in the docker group.
- Session was not restarted after group change.
- CI container lacks the socket mount or proper permissions.
Fix steps
- Confirm Docker daemon is running.
- Use sudo for one-off administrative commands if appropriate.
- Add the user to the docker group only when that security tradeoff is acceptable.
- Restart the shell session after group changes.
Verify the fix
- Run docker version.
- Check groups for the current user.
- Run docker ps without sudo only after the permission model is intentional.
FAQ
Is docker group access safe?
It is powerful and similar to root access on many systems. Grant it deliberately.
Why does it still fail after usermod?
The current session may not have refreshed group membership. Log out and back in.
Related tools and guides
Last updated: May 18, 2026