π ~1 min read
Table of contents
Symptom & Impact
Users cannot run docker commands without sudo due to socket permission denial.
Environment & Reproduction
Common after fresh Docker install or account provisioning changes.
docker ps
id
ls -l /var/run/docker.sock
systemctl status docker --no-pager
Root Cause Analysis
User is not in docker group or session has not reloaded updated group membership.
Quick Triage
Check group ownership and current user group list.
getent group docker
id -nG
stat /var/run/docker.sock
Step-by-Step Diagnosis
Confirm daemon health and socket ACL behavior under active login session.
systemctl is-active docker
journalctl -u docker -n 80 --no-pager
namei -l /var/run/docker.sock

Solution – Primary Fix
Add user to docker group and refresh session credentials.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo usermod -aG docker $USER
newgrp docker
docker ps
sudo systemctl restart docker

Solution – Alternative Approaches
Use rootless Docker mode where group-based access is restricted by policy.
dockerd-rootless-setuptool.sh install
systemctl --user enable --now docker
docker context use rootless
Verification & Acceptance Criteria
Accepted when non-root docker commands run without permission errors.
id -nG | tr ' ' 'n' | grep docker
docker run --rm hello-world
Rollback Plan
Remove group membership if least-privilege policy requires rollback.
sudo gpasswd -d $USER docker
logout
Prevention & Hardening
Document privileged group governance and enforce audited onboarding scripts.
getent group docker
sudo journalctl -u docker --since '7 days ago' --no-pager | tail -n 100
Related Errors & Cross-Refs
Related errors include cannot connect to Docker daemon and permission denied while trying to connect to daemon socket.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Docker Engine post-install docs for Linux and Ubuntu security guidance for container runtimes.
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.