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

Permission denied: file unable to be removed #48

Open
mazzy89 opened this issue Sep 26, 2023 · 4 comments · May be fixed by #49
Open

Permission denied: file unable to be removed #48

mazzy89 opened this issue Sep 26, 2023 · 4 comments · May be fixed by #49

Comments

@mazzy89
Copy link

mazzy89 commented Sep 26, 2023

I get the following issue at the next run during the checkout.

The deployment folder belongs to root and it is mounted inside the container action-promote. The checkout step tries to remove it but it fails because of permission issue.

Error: File was unable to be removed Error: EACCES: permission denied, unlink '/home/me/actions-runner/_work/repo/repo/deployment/.git/objects/09/643f57ac3c6dbde3c0f3db67f589fdd597d6f8'
@mazzy89
Copy link
Author

mazzy89 commented Sep 26, 2023

Here an exhaustive explanation of the problem actions/runner#1282 (comment)

@mazzy89
Copy link
Author

mazzy89 commented Sep 26, 2023

A good example is from the yq action Dockerfile https://github.com/mikefarah/yq/blob/master/Dockerfile

RUN set -eux; \
  addgroup -g 1000 yq; \
  adduser -u 1000 -G yq -s /bin/sh -h /home/yq -D yq

RUN chown -R yq:yq /workdir

USER yq

@mazzy89
Copy link
Author

mazzy89 commented Sep 26, 2023

I will try to add the user in the Dockerfile and wire a contribution if tests work

@mazzy89 mazzy89 linked a pull request Sep 27, 2023 that will close this issue
@highb
Copy link
Contributor

highb commented Oct 19, 2023

We should definitely figure out a fix here that both satisfies Github's demand for root users in containers and fixes these issues.

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

Successfully merging a pull request may close this issue.

2 participants