Open shuhaib-kk opened 1 month 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
+1 I seem to be getting this error Error: EACCES: permission denied, mkdir '/home/ec2-user/actions-runner/_work/_tool/node/16.20.2'
+1 EACCES: permission denied, mkdir '/opt/hostedtoolcache/node/20.15.0'
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.
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.
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.
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
delete the problematic folder manually in your workflow before setting up Node.js with sudo permissions. jobs: build: runs-on: self-hosted steps:
name: Delete Node.js folder with sudo run: sudo rm -rf /home/ec2-user/actions-runner/_work/_tool/node/16.20.2
uses: actions/checkout@v4
name: Set up Node.js uses: actions/setup-node@v3 with: node-version: '20'
Use the following commands to grant write permissions to the runner user: sudo chown -R ec2-user:ec2-user /home/ec2-user/actions-runner sudo chmod -R 755 /home/ec2-user/actions-runner
Please try this resolution and kindly let us know incase of any issues.
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