[GH-ISSUE #1849] "Permission denied" for non-executable scripts in run: #899

Closed
opened 2026-03-01 21:47:15 +03:00 by kerem · 5 comments
Owner

Originally created by @wolph on GitHub (Jun 8, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1849

Bug report info

act version:            0.2.46
GOOS:                   windows
GOARCH:                 amd64
NumCPU:                 32
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        \\.\pipe\docker_engine(broken)
Config files:
        C:\Users\user\.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.18.10
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.46 -X main.commit=b0d0cec71f2240fc629dcaa1889ed8c4ad52beb9 -X main.date=2023-06-01T02:39:24Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 windows
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         b0d0cec71f2240fc629dcaa1889ed8c4ad52beb9
                vcs.time:             2023-06-01T02:39:05Z
                vcs.modified:         false
Docker Engine:
        Engine version:        24.0.2
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:
        OS arch:               x86_64
        OS kernel:             4.19.128-microsoft-standard
        OS CPU:                32
        OS memory:             32063 MB
        Security options:
                name=seccomp,profile=builtin

Command used with act

act

Describe issue

This issue describes it pretty nicely: https://github.com/snok/install-poetry/pull/117

Long story short, the install-poetry action has a run: main.sh: github.com/snok/install-poetry@c137a18a0f/action.yml (L35)
On Github Actions that works perfectly, when running within act this results in:
/var/run/act/workflow/1-composite-0.sh: line 2: /var/run/act/actions/snok-install-poetry@v1.3.3/main.sh: Permission denied

No response

Workflow content

name: act test

on: push

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-python@v4
      - uses: snok/install-poetry@v1

Relevant log output

[act test/test]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1-composite-0.sh] user= workdir=
| /var/run/act/workflow/1-composite-0.sh: line 2: /var/run/act/actions/snok-install-poetry@v1/main.sh: Permission denied```

Additional information

No response

Originally created by @wolph on GitHub (Jun 8, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1849 ### Bug report info ```plain text act version: 0.2.46 GOOS: windows GOARCH: amd64 NumCPU: 32 Docker host: DOCKER_HOST environment variable is not set Sockets found: \\.\pipe\docker_engine(broken) Config files: C:\Users\user\.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.18.10 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -compiler: gc -ldflags: -s -w -X main.version=0.2.46 -X main.commit=b0d0cec71f2240fc629dcaa1889ed8c4ad52beb9 -X main.date=2023-06-01T02:39:24Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: windows GOAMD64: v1 vcs: git vcs.revision: b0d0cec71f2240fc629dcaa1889ed8c4ad52beb9 vcs.time: 2023-06-01T02:39:05Z vcs.modified: false Docker Engine: Engine version: 24.0.2 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: x86_64 OS kernel: 4.19.128-microsoft-standard OS CPU: 32 OS memory: 32063 MB Security options: name=seccomp,profile=builtin ``` ### Command used with act ```sh act ``` ### Describe issue This issue describes it pretty nicely: https://github.com/snok/install-poetry/pull/117 Long story short, the `install-poetry` action has a `run: main.sh`: https://github.com/snok/install-poetry/blob/c137a18a0f870900b733c9854a106db22cda4867/action.yml#L35 On Github Actions that works perfectly, when running within `act` this results in: ```/var/run/act/workflow/1-composite-0.sh: line 2: /var/run/act/actions/snok-install-poetry@v1.3.3/main.sh: Permission denied``` ### Link to GitHub repository _No response_ ### Workflow content ```yml name: act test on: push jobs: test: runs-on: ubuntu-latest steps: - uses: actions/setup-python@v4 - uses: snok/install-poetry@v1 ``` ### Relevant log output ```sh [act test/test] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1-composite-0.sh] user= workdir= | /var/run/act/workflow/1-composite-0.sh: line 2: /var/run/act/actions/snok-install-poetry@v1/main.sh: Permission denied``` ``` ### Additional information _No response_
kerem 2026-03-01 21:47:15 +03:00
Author
Owner

@yknx4 commented on GitHub (Jun 16, 2023):

can confirm this happens after the docker cp src=C:\Users\ZB Jade Ornelas\.cache\act/whatever-action@latest/ dst=/var/run/act/actions/whatever-action@latest/ because the files on the docker would need a chmod a+x

<!-- gh-comment-id:1594052089 --> @yknx4 commented on GitHub (Jun 16, 2023): can confirm this happens after the `docker cp src=C:\Users\ZB Jade Ornelas\.cache\act/whatever-action@latest/ dst=/var/run/act/actions/whatever-action@latest/` because the files on the docker would need a `chmod a+x`
Author
Owner

@oldnaari commented on GitHub (Oct 29, 2023):

Having the same issue.
Way to reproduce:
Run action "linux" on Windows 11 for commit github.com/oldnaari/Vermins-of-Dune@e0006aa275

<!-- gh-comment-id:1784168005 --> @oldnaari commented on GitHub (Oct 29, 2023): Having the same issue. **Way to reproduce:** Run action "linux" on Windows 11 for commit https://github.com/oldnaari/Vermins-of-Dune/commit/e0006aa275d4010d58db8bfd5964c2834e2f512c
Author
Owner

@github-actions[bot] commented on GitHub (Apr 27, 2024):

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

<!-- gh-comment-id:2080252212 --> @github-actions[bot] commented on GitHub (Apr 27, 2024): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@virzak commented on GitHub (Jun 30, 2024):

Also applies to xu-cheng/latex-action
github.com/xu-cheng/latex-action@1ccd8e9a1b/action.yml (L48-L49)

<!-- gh-comment-id:2198655760 --> @virzak commented on GitHub (Jun 30, 2024): Also applies to xu-cheng/latex-action https://github.com/xu-cheng/latex-action/blob/1ccd8e9a1ba76e30b547a1baf0e9c6d5ca33aea3/action.yml#L48-L49
Author
Owner

@ChristopherHX commented on GitHub (Jun 30, 2024):

On windows the following cli option should turn on a fix for this --use-new-action-cache

A mass rewrite of a hot code path can cause a big behavior change, since then the old behavior is still in place by default
Note in this case the file must be marked as executable in git like in xu-cheng/latex-action

<!-- gh-comment-id:2198799653 --> @ChristopherHX commented on GitHub (Jun 30, 2024): On windows the following cli option should turn on a fix for this `--use-new-action-cache` A mass rewrite of a hot code path can cause a big behavior change, since then the old behavior is still in place by default Note in this case the file must be marked as executable in git like in xu-cheng/latex-action
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#899
No description provided.