[GH-ISSUE #740] EACCES: permission denied for github-actions-demo using ubuntu:full-20.04 #467

Closed
opened 2026-03-01 21:43:40 +03:00 by kerem · 3 comments
Owner

Originally created by @cskeogh on GitHub (Jun 18, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/740

With ~/.actrc:

-P ubuntu-latest=catthehacker/ubuntu:full-20.04

Running commands:

$ git clone https://github.com/cplee/github-actions-demo.git
$ cd github-actions-demo
$ act -j test

Results in EACCES: permission denied:

CI/test] 🚀  Start image=catthehacker/ubuntu:full-20.04
[CI/test]   🐳  docker run image=catthehacker/ubuntu:full-20.04 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[CI/test]   🐳  docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root
[CI/test]   🐳  docker cp src=/home/craig/Projects/github-actions-demo/. dst=/home/craig/Projects/github-actions-demo
[CI/test]   🐳  docker exec cmd=[mkdir -p /home/craig/Projects/github-actions-demo] user=
[CI/test] ⭐  Run actions/checkout@v2
[CI/test]   ✅  Success - actions/checkout@v2
[CI/test] ⭐  Run actions/setup-node@v1
INFO[0001]   ☁  git clone 'https://github.com/actions/setup-node' # ref=v1 
[CI/test]   🐳  docker cp src=/home/craig/.cache/act/actions-setup-node@v1/ dst=/var/run/act/actions/actions-setup-node@v1/
[CI/test]   🐳  docker exec cmd=[mkdir -p /var/run/act/actions/actions-setup-node@v1/] user=
[CI/test]   🐳  docker exec cmd=[node /var/run/act/actions/actions-setup-node@v1/dist/index.js] user=
[CI/test]   💬  ::debug::isExplicit: 
[CI/test]   💬  ::debug::explicit? false
[CI/test]   💬  ::debug::isExplicit: 10.23.0
[CI/test]   💬  ::debug::explicit? true
[CI/test]   💬  ::debug::isExplicit: 12.20.0
[CI/test]   💬  ::debug::explicit? true
[CI/test]   💬  ::debug::isExplicit: 14.15.1
[CI/test]   💬  ::debug::explicit? true
[CI/test]   💬  ::debug::isExplicit: 8.17.0
[CI/test]   💬  ::debug::explicit? true
[CI/test]   💬  ::debug::evaluating 4 versions
[CI/test]   💬  ::debug::matched: 10.23.0
[CI/test]   💬  ::debug::checking cache: /opt/hostedtoolcache/node/10.23.0/x64
[CI/test]   💬  ::debug::Found tool in cache node 10.23.0 x64
| [command]/opt/hostedtoolcache/node/10.23.0/x64/bin/node --version
| v10.23.0
| [command]/opt/hostedtoolcache/node/10.23.0/x64/bin/npm --version
| 6.14.8
[CI/test]##[add-matcher]/run/act/actions/actions-setup-node@v1/.github/tsc.json
[CI/test]##[add-matcher]/run/act/actions/actions-setup-node@v1/.github/eslint-stylish.json
[CI/test]##[add-matcher]/run/act/actions/actions-setup-node@v1/.github/eslint-compact.json
[CI/test]   ✅  Success - actions/setup-node@v1
[CI/test] ⭐  Run npm install
[CI/test]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /home/craig/Projects/github-actions-demo/workflow/2] user=
| npm WARN checkPermissions Missing write access to /home/craig/Projects/github-actions-demo
| npm ERR! code EACCES
| npm ERR! syscall access
| npm ERR! path /home/craig/Projects/github-actions-demo
| npm ERR! errno -13
| npm ERR! Error: EACCES: permission denied, access '/home/craig/Projects/github-actions-demo'
| npm ERR!  { [Error: EACCES: permission denied, access '/home/craig/Projects/github-actions-demo']
| npm ERR!   stack:
| npm ERR!    'Error: EACCES: permission denied, access \'/home/craig/Projects/github-actions-demo\'',
| npm ERR!   errno: -13,
| npm ERR!   code: 'EACCES',
| npm ERR!   syscall: 'access',
| npm ERR!   path: '/home/craig/Projects/github-actions-demo' }
| npm ERR! 
| npm ERR! The operation was rejected by your operating system.
| npm ERR! It is likely you do not have the permissions to access this file as the current user
| npm ERR! 
| npm ERR! If you believe this might be a permissions issue, please double-check the
| npm ERR! permissions of the file and its containing directories, or try running
| npm ERR! the command again as root/Administrator.
| 
| npm ERR! A complete log of this run can be found in:
| npm ERR!     /home/runner/.npm/_logs/2021-06-18T08_44_05_810Z-debug.log
[CI/test]   ❌  Failure - npm install
Error: exit with `FAILURE`: 243

act works ok with ~/.actrc:

-P ubuntu-latest=catthehacker/ubuntu:act-latest
...
<snip>
...
CI/test]   🐳  docker exec cmd=[bash --noprofile --norc -e -o pipefail /home/craig/Projects/github-actions-demo/workflow/3] user=
| 
| > github-actions-demo@1.0.0 test /home/craig/Projects/github-actions-demo
| > mocha ./tests --recursive
| 
| 
| 
|   GET /
|     ✓ should respond with hello world
| 
| 
|   1 passing (19ms)
| 
[CI/test]   ✅  Success - npm test

act version 0.2.23
Docker version 20.10.7, build f0df350

Originally created by @cskeogh on GitHub (Jun 18, 2021). Original GitHub issue: https://github.com/nektos/act/issues/740 With `~/.actrc`: ``` -P ubuntu-latest=catthehacker/ubuntu:full-20.04 ``` Running commands: ```shell $ git clone https://github.com/cplee/github-actions-demo.git $ cd github-actions-demo $ act -j test ``` Results in EACCES: permission denied: ```shell CI/test] 🚀 Start image=catthehacker/ubuntu:full-20.04 [CI/test] 🐳 docker run image=catthehacker/ubuntu:full-20.04 platform= entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [CI/test] 🐳 docker exec cmd=[mkdir -m 0777 -p /var/run/act] user=root [CI/test] 🐳 docker cp src=/home/craig/Projects/github-actions-demo/. dst=/home/craig/Projects/github-actions-demo [CI/test] 🐳 docker exec cmd=[mkdir -p /home/craig/Projects/github-actions-demo] user= [CI/test] ⭐ Run actions/checkout@v2 [CI/test] ✅ Success - actions/checkout@v2 [CI/test] ⭐ Run actions/setup-node@v1 INFO[0001] ☁ git clone 'https://github.com/actions/setup-node' # ref=v1 [CI/test] 🐳 docker cp src=/home/craig/.cache/act/actions-setup-node@v1/ dst=/var/run/act/actions/actions-setup-node@v1/ [CI/test] 🐳 docker exec cmd=[mkdir -p /var/run/act/actions/actions-setup-node@v1/] user= [CI/test] 🐳 docker exec cmd=[node /var/run/act/actions/actions-setup-node@v1/dist/index.js] user= [CI/test] 💬 ::debug::isExplicit: [CI/test] 💬 ::debug::explicit? false [CI/test] 💬 ::debug::isExplicit: 10.23.0 [CI/test] 💬 ::debug::explicit? true [CI/test] 💬 ::debug::isExplicit: 12.20.0 [CI/test] 💬 ::debug::explicit? true [CI/test] 💬 ::debug::isExplicit: 14.15.1 [CI/test] 💬 ::debug::explicit? true [CI/test] 💬 ::debug::isExplicit: 8.17.0 [CI/test] 💬 ::debug::explicit? true [CI/test] 💬 ::debug::evaluating 4 versions [CI/test] 💬 ::debug::matched: 10.23.0 [CI/test] 💬 ::debug::checking cache: /opt/hostedtoolcache/node/10.23.0/x64 [CI/test] 💬 ::debug::Found tool in cache node 10.23.0 x64 | [command]/opt/hostedtoolcache/node/10.23.0/x64/bin/node --version | v10.23.0 | [command]/opt/hostedtoolcache/node/10.23.0/x64/bin/npm --version | 6.14.8 [CI/test] ❓ ##[add-matcher]/run/act/actions/actions-setup-node@v1/.github/tsc.json [CI/test] ❓ ##[add-matcher]/run/act/actions/actions-setup-node@v1/.github/eslint-stylish.json [CI/test] ❓ ##[add-matcher]/run/act/actions/actions-setup-node@v1/.github/eslint-compact.json [CI/test] ✅ Success - actions/setup-node@v1 [CI/test] ⭐ Run npm install [CI/test] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /home/craig/Projects/github-actions-demo/workflow/2] user= | npm WARN checkPermissions Missing write access to /home/craig/Projects/github-actions-demo | npm ERR! code EACCES | npm ERR! syscall access | npm ERR! path /home/craig/Projects/github-actions-demo | npm ERR! errno -13 | npm ERR! Error: EACCES: permission denied, access '/home/craig/Projects/github-actions-demo' | npm ERR! { [Error: EACCES: permission denied, access '/home/craig/Projects/github-actions-demo'] | npm ERR! stack: | npm ERR! 'Error: EACCES: permission denied, access \'/home/craig/Projects/github-actions-demo\'', | npm ERR! errno: -13, | npm ERR! code: 'EACCES', | npm ERR! syscall: 'access', | npm ERR! path: '/home/craig/Projects/github-actions-demo' } | npm ERR! | npm ERR! The operation was rejected by your operating system. | npm ERR! It is likely you do not have the permissions to access this file as the current user | npm ERR! | npm ERR! If you believe this might be a permissions issue, please double-check the | npm ERR! permissions of the file and its containing directories, or try running | npm ERR! the command again as root/Administrator. | | npm ERR! A complete log of this run can be found in: | npm ERR! /home/runner/.npm/_logs/2021-06-18T08_44_05_810Z-debug.log [CI/test] ❌ Failure - npm install Error: exit with `FAILURE`: 243 ``` act works ok with `~/.actrc`: ``` -P ubuntu-latest=catthehacker/ubuntu:act-latest ``` ```shell ... <snip> ... CI/test] 🐳 docker exec cmd=[bash --noprofile --norc -e -o pipefail /home/craig/Projects/github-actions-demo/workflow/3] user= | | > github-actions-demo@1.0.0 test /home/craig/Projects/github-actions-demo | > mocha ./tests --recursive | | | | GET / | ✓ should respond with hello world | | | 1 passing (19ms) | [CI/test] ✅ Success - npm test ``` act version 0.2.23 Docker version 20.10.7, build f0df350
kerem 2026-03-01 21:43:40 +03:00
Author
Owner

@cskeogh commented on GitHub (Jun 18, 2021):

A workaround. Use:

-b, --bind                             bind working directory to container, rather than copy
<!-- gh-comment-id:863972717 --> @cskeogh commented on GitHub (Jun 18, 2021): A workaround. Use: ``` -b, --bind bind working directory to container, rather than copy ```
Author
Owner

@catthehacker commented on GitHub (Jun 18, 2021):

Duplicate of #398

<!-- gh-comment-id:864260256 --> @catthehacker commented on GitHub (Jun 18, 2021): Duplicate of #398
Author
Owner

@SayakMukhopadhyay commented on GitHub (Jul 15, 2021):

Be careful while binding to a working directory which contains important files. This deleted all files that were docker ignored in my working directory

<!-- gh-comment-id:880823646 --> @SayakMukhopadhyay commented on GitHub (Jul 15, 2021): Be careful while binding to a working directory which contains important files. This deleted all files that were docker ignored in my working directory
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#467
No description provided.