docker ps fails with permission denied on docker.sock.
Your user is not in the docker group (or the sock is root-only).
sudo usermod -aG docker $USER && newgrp dockergroups | grep dockerls -l /var/run/docker.sock # srw-rw---- root dockerTreat docker group membership as root-equivalent access.
Full walkthrough: Docker "Permission Denied" on /var/run/docker.sock: Fixed on the NinjaOps blog.
NinjaOps publishes free engineering guides. Some outbound links are affiliate links: they cost you nothing and support the site.
Last reviewed 2026-10-02 · NinjaOps SEO grid · DevOps blog