Skip to content

Cannot create directory ‘/opt/hostedtoolcache’ after recent release #459

@kenorb

Description

@kenorb

Description:

The following error start happening after the recent action release:

2022-07-12T14:12:47.7158848Z ##[group]Run actions/setup-python@v4
2022-07-12T14:12:47.7159230Z with:
2022-07-12T14:12:47.7159527Z   python-version: 3.x
2022-07-12T14:12:47.7160059Z   token: ***
2022-07-12T14:12:47.7160394Z   update-environment: true
2022-07-12T14:12:47.7162682Z ##[endgroup]
2022-07-12T14:12:48.0166854Z Version 3.x was not found in the local cache
2022-07-12T14:12:48.3072207Z Version 3.x is available for downloading
2022-07-12T14:12:48.3074130Z Download from "https://github.com/actions/python-versions/releases/download/3.10.5-2452607758/python-3.10.5-linux-20.04-x64.tar.gz"
2022-07-12T14:12:49.1279090Z Extract downloaded archive
2022-07-12T14:12:49.1380950Z [command]/usr/bin/tar xz --warning=no-unknown-keyword -C /actions-runner/_work/_temp/2d83bfeb-a252-4083-95bf-6f30cffc5507 -f /actions-runner/_work/_temp/c2619dbf-23ad-46f0-9b07-baf06258c9c8
2022-07-12T14:12:52.2679935Z Execute installation script
2022-07-12T14:12:52.2887302Z Check if Python hostedtoolcache folder exist...
2022-07-12T14:12:52.2888180Z Creating Python hostedtoolcache folder...
2022-07-12T14:12:52.2921018Z ##[error]mkdir:
2022-07-12T14:12:52.2937518Z ##[error]cannot create directory ‘/opt/hostedtoolcache’
2022-07-12T14:12:52.2939104Z ##[error]: Permission denied
2022-07-12T14:12:52.2941609Z ##[error]The process '/usr/bin/bash' failed with exit code 1
2022-07-12T14:12:52.3294942Z Post job cleanup.

Action version:

v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

  • 3.10.5

Repro steps:

  setup-python:
    runs-on: self-hosted
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-python@v4
        with:
          python-version: 3.x

Expected behavior:

Won't error.

Actual behavior:

It errors.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions