Interview Prep/GitHub Actions/Runners, Self-hosted & ARC

Self-hosted runner jobs fail with `EACCES: permission denied, unlink '/home/runner/_work/app/app/dist/index.js'` at checkout.

IntermediateTroubleshootingRunners, Self-hosted & ARC
Answer

Likely causes → A previous container job wrote root-owned files into the persistent workspace; the runner user cannot delete them.

Diagnose → find _work -user root | head.

Fix → Clean with a privileged cleanup (docker run --rm -v $PWD:/w alpine rm -rf /w/dist), then run containers as the runner UID.

Prevent → Ephemeral runners, or a job-completed hook that resets ownership.

All GitHub Actions questions Roadmap: GitHub Actions

More on Runners, Self-hosted & ARC