Skip to content
Latchkey

GitHub Actions "RUNNER_TEMP is not writable"

Actions write scratch files to RUNNER_TEMP. In container jobs running as a non-root user, that directory can be owned by root, so writes are denied and tooling fails.

What this error means

A step or action fails writing to the temp directory with a permission-denied error.

github-actions
Error: EACCES: permission denied, open '/home/runner/work/_temp/abc123.sh'
##[error]Process completed with exit code 1.

Common causes

Container user cannot write RUNNER_TEMP

The runner mounts the temp directory owned by root, but the container job runs as a different UID without write access.

How to fix it

Run as a user with write access or fix ownership

  1. Run the container as root, or set the container user to match the runner-mounted ownership.
  2. Alternatively, chown the temp and workspace directories early in the job.
  3. Re-run.
.github/workflows/ci.yml
jobs:
  build:
    runs-on: ubuntu-latest
    container:
      image: node:20-bookworm
      options: --user root
    steps:
      - uses: actions/checkout@v4
      - run: npm ci

How to prevent it

  • Match the container user to the runner-mounted directory ownership.
  • Avoid minimal images that drop to a UID without write access to RUNNER_TEMP.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →