Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't run as root but as id -u #175

Open
babariviere opened this issue Jul 4, 2024 · 2 comments
Open

Don't run as root but as id -u #175

babariviere opened this issue Jul 4, 2024 · 2 comments

Comments

@babariviere
Copy link

Since we are using a self-hosted runner, we are not using root as the default user for our workflows.

Currently, this tool is breaking actions/checkout since it cannot clear the files created by this workflow.

Example error:

Deleting the contents of '/home/actions-runner/org/repo'
Error: File was unable to be removed Error: EACCES: permission denied, unlink '/home/actions-runner/org/repo/build-artifacts-1720079675/my-cmd'

To fix this, this workflow should use the default user by using uid from id -u.

@wangyoucao577
Copy link
Owner

Is there any side effect? PR is welcome!

@babariviere
Copy link
Author

@wangyoucao577 New folders with use the new user ID, and as there is no collision with previous builds, there shouldn't be any side effects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants