actions / actions/setup-python

Permission denied when creating symlinks on macOS self-hosted runners

Open
#1,301 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
TypeScript
Stars
2.2k
Forks
739
Avg merge
6d 18h
Merged PRs (30d)
1

Description

Description:

Problem

setup-python fails on self-hosted macOS EC2 runners with:

Error: ln: python314: Permission denied

The setup.sh installer script uses sudo to install the Python framework into /Library/Frameworks/ (line 50), but the subsequent symlink creation inside that root-owned directory runs without sudo, causing a permission error on runners where the CI user is not an admin.

Action version:
v6

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Any

Repro steps:
Make a deployment on a MacOS instance where the runner is running as a standard user with sudo permission.

Expected behavior:
The installation process creates symbolic links without failures.

Actual behavior:
Image

Fix:
Can be addressed by this PR: https://github.com/actions/python-versions/pull/384

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review setup.sh around line 50 and the referenced pull request in actions/python-versions#384 to understand the installer and symlink steps. Reproduce the setup-python v6 installation on a standard-user macOS self-hosted runner, then confirm that symbolic-link creation completes without a permission error.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python, shell
Domain
ci-cd
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.