Skip to content

"Error: EACCES: permission denied, open" when running on non-root self-hosted runners #1011

Closed
@lucazz

Description

@lucazz

Describe the bug

Hello there everyone,

I have a GitHub Actions Runner Controller (ARC) Runner Set deployed on an EKS cluster, and workflow executions are failing with the following error message:

Error: EACCES: permission denied, open '/__w/_temp/_runner_file_commands/set_env_43334ec4-c528-4eeb-b934-cb1d34df5bea'
Error: Error: failed to run script step: command terminated with non-zero exit code: error executing command [sh -e /__w/_temp/d44e9240-d25b-11ee-91a7-1b422eefd1bb.sh], exit code 1
Error: Process completed with exit code 1.
Error: Executing the custom container implementation failed. Please contact your self hosted runner administrator.

These pods are running as Nonroot, and the only other reference I see to this behavior is on #156, where the fix ran this action as root.

Expected Behavior

One should be able to assume a given role even when running this action in a non-root container.

Current Behavior

The workflow execution fails with the following error message:

Error: EACCES: permission denied, open '/__w/_temp/_runner_file_commands/set_env_43334ec4-c528-4eeb-b934-cb1d34df5bea'
Error: Error: failed to run script step: command terminated with non-zero exit code: error executing command [sh -e /__w/_temp/d44e9240-d25b-11ee-91a7-1b422eefd1bb.sh], exit code 1
Error: Process completed with exit code 1.
Error: Executing the custom container implementation failed. Please contact your self hosted runner administrator.

Reproduction Steps

On a runner pod running without root, run the following workflow:

---
name: ARC Demo
on:
  workflow_dispatch:

jobs:
  Explore-GitHub-Actions:
    runs-on: prod
    container:
      image: 012345678910.dkr.ecr.us-east-1.amazonaws.com/foo/bar:latest
    env:
      AWS_DEFAULT_REGION: us-east-1
      AWS_ROLE: arn:aws:iam::012345678910:role/some-role
    steps:
      - name: Setup AWS access
        uses: aws-actions/configure-aws-credentials@v4
        with:
          aws-region: ${{ env.AWS_DEFAULT_REGION }}
          role-skip-session-tagging: true
          role-to-assume: ${{ env.AWS_ROLE }}
      - run: aws sts get-caller-identity

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingresponse-requestedWaiting on additional info and feedback. Will move to 'closing-soon' in 5 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions