actions / setup-node

Set up your GitHub Actions workflow with a specific version of node.js
MIT License
3.75k stars 1.23k forks source link

EACCES: permission denied #1088

Open shuhaib-kk opened 1 month ago

shuhaib-kk commented 1 month ago

Am getting the following error.

EACCES: permission denied, mkdir '/home/gh-runner/actions-runner/_work/_tool/node/16.20.2' Falling back to download directly from Node Acquiring 16.20.2 - x64 from https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-x64.tar.gz Extracting ... /bin/tar xz --strip 1 --warning=no-unknown-keyword -C /home/gh-runner/actions-runner/_work/_temp/67e93bd8-a888-4871-b944-ff1884bf5c4a -f /home/gh-runner/actions-runner/_work/_temp/bb0f2a75-7344-4727-bcfe-ba452219c4af Adding to the cache ... Error: EACCES: permission denied, mkdir '/home/gh-runner/actions-runner/_work/_tool/node/16.20.2'

using actions/setup-node@v3

JesusRamp commented 2 weeks ago

Same issue here, EACCES: permission denied, mkdir '/home/circleci/_work/_tool/node/18.20.3' and I'm using actions/setup-node@v4.0.2

orbi-ci-bot commented 2 weeks ago

+1 I seem to be getting this error Error: EACCES: permission denied, mkdir '/home/ec2-user/actions-runner/_work/_tool/node/16.20.2'

brodriguez-eb commented 2 weeks ago

+1 EACCES: permission denied, mkdir '/opt/hostedtoolcache/node/20.15.0'

priyagupta108 commented 2 weeks ago

Hello @shuhaib-kk, Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

aparnajyothi-y commented 1 week ago

Hello Everyone, we have investigated the issue and we are able to set up the above mentioned node versions 16.20.2, 18.20.0, 20.15.0 successfully on the github hosted runner ubuntu-latest in this workflow run. Please share the repro link to investigate the issue and assist further as we are not able to reproduce the issue.

orbi-ci-bot commented 1 week ago

Hi @aparnajyothi-y, I am unable to view the workflow you have shared. We are using a self hosted runner on EC2 with Amazon Linux 3. Here is the error.

Error: EACCES: permission denied, mkdir '/home/ec2-user/actions-runner/_work/_tool/node/16.20.2'

I have to delete the folder manually in my workflow before the node setup as a workaround with sudo permissions as I can't find any other way.

aparnajyothi-y commented 5 days ago

Hello @orbi-ci-bot, Apologies,I have updated the visibility of this test workflow The error EACCES: permission denied, mkdir '/home/ec2-user/actions-runner/_work/_tool/node/16.20.2' indicates a permissions issue with the self-hosted runner on EC2 using Amazon Linux 3. The possible workarounds that we can try to resolve the issue are mentioned below

Please try this resolution and kindly let us know incase of any issues.