📖 ~1 min read
Table of contents
Symptom & Impact
docker commands fail with permission denied for /var/run/docker.sock.
Environment & Reproduction
Ubuntu 24.04 with docker-ce or distro package installed for non-root users.
Root Cause Analysis
User not in docker group, daemon inactive, or socket ownership changed unexpectedly.
Quick Triage
Run systemctl status docker and id $USER to check service and group membership.
Step-by-Step Diagnosis
Inspect socket permissions with ls -l /var/run/docker.sock and review daemon logs via journalctl -u docker.

Solution – Primary Fix
Add user to docker group, restart session, and ensure docker service starts cleanly at boot.
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 sudo for docker commands on hardened systems where docker group elevation is disallowed.
Verification & Acceptance Criteria
docker run hello-world executes successfully without sudo for approved users.
Rollback Plan
Remove user from docker group and reapply stricter root-only daemon access policy.
Prevention & Hardening
Document privilege implications of docker group and use rootless mode where feasible.
Related Errors & Cross-Refs
Got permission denied while trying to connect to Docker daemon socket.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Docker post-installation docs, Ubuntu service management, and rootless Docker guidance.
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.