📖 ~1 min read
Table of contents
Symptom & Impact
docker ps returns permission denied on /var/run/docker.sock for standard users. CI and developer workflows are blocked.
Environment & Reproduction
Ubuntu 22.04 with Docker Engine installed via apt repository. Reproduce by running docker commands as user not in docker group.
Root Cause Analysis
UNIX socket access is limited to root and docker group members. Session may not reflect new group membership until re-login.
Quick Triage
Check socket permissions with ls -l /var/run/docker.sock and verify groups using id .
Step-by-Step Diagnosis
Confirm docker daemon status with systemctl status docker, inspect daemon logs via journalctl -u docker, and validate group assignment propagation.

Solution – Primary Fix
Add user to docker group using sudo usermod -aG docker , then fully log out/in or run newgrp docker before retrying.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Use rootless Docker mode for tighter privilege boundaries where feasible.
Verification & Acceptance Criteria
Non-root user can run docker ps successfully, and daemon remains healthy under systemd supervision.
Rollback Plan
Remove user from docker group if policy requires, and switch to sudo-based docker command execution.
Prevention & Hardening
Treat docker group as privileged, apply least privilege controls, and audit group membership regularly.
Related Errors & Cross-Refs
Got permission denied while trying to connect to the Docker daemon socket.
Related tutorial: View the step-by-step tutorial for Ubuntu 22.04 LTS.
View all Ubuntu 22.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Docker post-installation docs, Ubuntu Docker package guidance, Linux group security best practices.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.