[GH-ISSUE #2336] Getting dial unix /var/run/docker.sock: connect: permission denied #1078

Closed
opened 2026-03-01 21:48:44 +03:00 by kerem · 4 comments
Owner

Originally created by @znewsham on GitHub (May 22, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2336

Bug report info

act version:            0.2.61
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 20
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock
Config files:           
	/home/zacknewsham/snap/gh/502/.config/act/actrc:
		-P ubuntu-latest=catthehacker/ubuntu:act-latest
		-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
		-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
		-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
	Go version:            go1.20.14
	Module path:           github.com/nektos/act
	Main version:          (devel)
	Main path:             github.com/nektos/act
	Main checksum:         
	Build settings:
		-buildmode:           exe
		-compiler:            gc
		-trimpath:            true
		CGO_ENABLED:          0
		GOARCH:               amd64
		GOOS:                 linux
		GOAMD64:              v1
		vcs:                  git
		vcs.revision:         e8856f0fb00fcdd16eef2325b845f55f5d346f51
		vcs.time:             2023-08-21T16:17:06Z
		vcs.modified:         true

Error: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info": dial unix /var/run/docker.sock: connect: permission denied

Command used with act

Any act command - including `gh act --bug-report`

Describe issue

My user has permission to access /var/run/docker.sock - I've also tried each of the workarounds listed here: https://github.com/nektos/act/issues/1798

I cannot get gh act to run.

  1. Is the github extension not supported?
  2. Would I have this problem using a different install?
  3. Is this error coming from the host - or from a container somehow?
  4. Which user is this running as (I'd assumed my own, but perhaps it isn't)

I've tried chowning it too. docker ps runs just fine

ls -lha /var/run/docker.sock 
srw-rw-rw- 1 root docker 0 Apr  9 17:29 /var/run/docker.sock

No response

Workflow content

n/a

Relevant log output

n/a

Additional information

No response

Originally created by @znewsham on GitHub (May 22, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2336 ### Bug report info ```plain text act version: 0.2.61 GOOS: linux GOARCH: amd64 NumCPU: 20 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock Config files: /home/zacknewsham/snap/gh/502/.config/act/actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.20.14 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: exe -compiler: gc -trimpath: true CGO_ENABLED: 0 GOARCH: amd64 GOOS: linux GOAMD64: v1 vcs: git vcs.revision: e8856f0fb00fcdd16eef2325b845f55f5d346f51 vcs.time: 2023-08-21T16:17:06Z vcs.modified: true Error: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info": dial unix /var/run/docker.sock: connect: permission denied ``` ### Command used with act ```sh Any act command - including `gh act --bug-report` ``` ### Describe issue My user has permission to access `/var/run/docker.sock` - I've also tried each of the workarounds listed here: https://github.com/nektos/act/issues/1798 I cannot get `gh act` to run. 1. Is the github extension not supported? 2. Would I have this problem using a different install? 3. Is this error coming from the host - or from a container somehow? 4. Which user is this running as (I'd assumed my own, but perhaps it isn't) I've tried chowning it too. `docker ps` runs just fine ``` ls -lha /var/run/docker.sock srw-rw-rw- 1 root docker 0 Apr 9 17:29 /var/run/docker.sock ``` ### Link to GitHub repository _No response_ ### Workflow content ```yml n/a ``` ### Relevant log output ```sh n/a ``` ### Additional information _No response_
kerem 2026-03-01 21:48:44 +03:00
Author
Owner

@znewsham commented on GitHub (May 22, 2024):

Confirmed, after fighting a ludicrous amount with nix - I got act installed there and don't see the issue. Seems this is specific to gh act

<!-- gh-comment-id:2125228212 --> @znewsham commented on GitHub (May 22, 2024): Confirmed, after fighting a ludicrous amount with `nix` - I got act installed there and don't see the issue. Seems this is specific to `gh act`
Author
Owner

@ChristopherHX commented on GitHub (May 22, 2024):

home/zacknewsham/snap/gh/502

Is your gh cli a canonical snap? The whole point of snap/flatpak is sandboxing or more so it's expected that the app has no longer access to the socket as the permissings are reduced to gain security

From my experience sandboxes hinder local development for those writing code.

<!-- gh-comment-id:2125402655 --> @ChristopherHX commented on GitHub (May 22, 2024): > home/zacknewsham/snap/gh/502 Is your gh cli a canonical snap? The whole point of snap/flatpak is sandboxing or more so it's expected that the app has no longer access to the socket as the permissings are reduced to gain security From my experience sandboxes hinder local development for those writing code.
Author
Owner

@znewsham commented on GitHub (May 22, 2024):

It is - I wasn't aware there was a way to install github actions without snaps (I hate snaps anyway)

<!-- gh-comment-id:2125607572 --> @znewsham commented on GitHub (May 22, 2024): It is - I wasn't aware there was a way to install github actions without snaps (I hate snaps anyway)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 19, 2024):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:2484436365 --> @github-actions[bot] commented on GitHub (Nov 19, 2024): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1078
No description provided.