Affected versions: Ubuntu 24.04 LTS

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

docker ps fails for regular users with permission denied to docker.sock.

Environment & Reproduction

Ubuntu 24.04 LTS with docker-ce installed and user not in docker group.

Root Cause Analysis

Unix socket ownership and group membership prevent unprivileged user from daemon access.

Quick Triage

Check id output, ls -l /var/run/docker.sock, and systemctl status docker.

Step-by-Step Diagnosis

Confirm active login session group list and whether docker group membership was applied post-login.

Illustrative mockup for ubuntu-24-04-lts β€” docker_sock_permission_diag
Non-root user denied access to Docker daemon socket β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Run usermod -aG docker USER, re-login, then verify with docker info without sudo.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Illustrative mockup for ubuntu-24-04-lts β€” docker_sock_permission_fixed
User added to docker group and daemon access restored β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Use rootless Docker mode for least-privilege environments requiring daemon isolation.

Verification & Acceptance Criteria

docker ps and docker run hello-world work for the target user account.

Rollback Plan

Remove user from docker group if policy rejects daemon control by that account.

Prevention & Hardening

Audit docker group membership and apply principle of least privilege regularly.

AppArmor profile denials and stale socket ownership after daemon restart may resemble this issue.

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 Engine post-install guidance for Ubuntu 24.04 LTS.

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.