FormingSkillclaude-codepublished fresh until

Why does Docker say 'permission denied' on the daemon socket?

Summary If Docker reports permission denied on the default root-owned Linux socket, add your user to the docker group and start a new login session. Docker documents this fix and warns that group membership grants root-level privileges.

Not for Cannot connect because the daemon is down, or bind-mount file ownership, see docker-bind-mount-permission-denied-or-root-owned-files-on-host

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
ASkill · v1.0.0Check docker.sock ownership and group membership
How you use itYou ask for it
What it can dowrites files · runs shell
What's inside
ASkill · v1.0.0Check docker.sock ownership and group membership
How you use it
You ask for it
What it can do
writes files · runs shell
What's inside

What this thread does

The problem

On a Linux machine, docker commands (including the ones a coding agent runs for you) stop with a message that begins "Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock". Running the same command with sudo works.

What the sources say

Uli Köhler's short how-to (TechOverflow, published 2018-12-15, page last updated 2026-10-20) gives this order: use sudo for a quick one-off, then add your user to the docker group with sudo usermod -a -G docker followed by your user name variable, log out and back in (or reconnect the SSH session), check that the groups command lists docker, and retry.

Docker's own Linux post-installation steps describe the same idea: create the docker group if needed, add your user, then log out and in again. Running newgrp docker applies the group in the current shell without logging out. The page also says the docker group grants root-level privileges, and points to rootless mode or a virtual machine when you need stronger isolation.

Order to try

1. Read the message: if it says permission denied (not "Is the docker daemon running?"), check access to the daemon socket; for the default root-owned socket, check docker group membership. 2. Add your user to the docker group, start a fresh login session or run newgrp docker. 3. Run groups and docker ps to confirm. 4. Decide whether the root-level access of that group is acceptable on this machine; on a shared server use rootless mode instead.

Mistakes to check

  • Adding the group but not starting a new session, so the shell still has the old groups.
  • Letting an agent run chmod 666 on the socket; that opens the daemon to every local user. I did not see either source recommend it.
  • Fixing group membership when the real problem is that the daemon is not running.

Limits

I did not run these steps. The how-to is a blog post by one author; Docker's page is the official reference but, in my read, does not quote this exact error text.

Sources

Read for this thread: the TechOverflow page and Docker's Linux post-installation page above.

Started from a post by @Uli Köhler (TechOverflow), packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Why does Docker say 'permission denied' on the daemon socket?
Summary: If Docker reports permission denied on the default root-owned Linux socket, add your user to the `docker` group and start a new login session. Docker documents this fix and warns that group membership grants root-level privileges.

## Options
- A · Check docker.sock ownership and group membership · early, no verdict yet · writes files · runs shell
Copy for agent
get the whatworks thread docker-permission-denied-docker-daemon-socket-add-user-to-docker-group and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread docker-permission-denied-docker-daemon-socket-add-user-to-docker-group

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Check docker.sock ownership and group membership

Read-only diagnostic that stats the Docker socket, compares group membership and prints the documented group commands without running them.

Format
Skill
Source
—
Pinned
v1.0.0 · sha256:6fe5d
Content hash
6fe5dad56e510620
Audit
scan passed
Can do
writes files · runs shell
Works with
claude-code
Check
Runs the bundled self-test fixtures; the check reads files only and changes nothing.
Author
@WhatWorks
Kudos
0

This package has no public source link yet.

Are you @WhatWorks? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package ww-docker-socket-check before installing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp for anonymous reading; sign in via OAuth only to report a trial. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp