You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the GitHub search to find a similar question and didn't find it.
I searched in the documentation/README.
I already searched in Google "How to do X" and didn't find any information.
I already read and followed all the tutorial in the docs/README and didn't find an answer.
Commit to Help
I commit to help with one of those options 👆
Example Code
Permission denied issue in checkout@v4 in .github/workflows/deploy-production.yml
to give the 'github' account for the superuser, I applied this command for deployment.
So I changed the account for github runner as a root not 'github' account like the above.
Description
Hi full stack fastapi template project team,
First off, thanks for maintaining this project — it’s been really helpful.
I'm setting up a production deployment workflow using a self-hosted GitHub Actions runner as deployment.md wirtten, and I encountered an issue related to file permissions when using actions/checkout@v4.
The project documentation mentions creating a github user for the runner and running the GitHub Actions service under that account. However, during initial setup, I installed the runner with superuser (root) privileges. As a result, some Python .pyc files generated inside a Docker container (running as root) are owned by root, which leads to this error during the checkout@v4 cleanup step:
Error: File was unable to be removed
Error: EACCES: permission denied, unlink '/home/github/actions-runner/_work/.../__pycache__/__init__.cpython-310.pyc'
After some investigation, I traced the issue back to a mismatch in ownership — the github user (running the Actions runner) doesn't have permission to remove files created by root.
but it works only once time, so I changed the acount for github action runner
./svc.sh install root
This resolved the issue, but I wanted to clarify a couple of things:
Is this issue caused by not strictly following the instructions in deployment.md, or is it something other users are also likely to encounter in similar setups?
Aside from running the runner process non-root, is there a specific reason for creating and using a separate github user account for the self-hosted runner?
If this is a common or valid issue, are there recommended solutions besides either changing file ownership after each job or running the runner as root (which has its own security risks)?
Appreciate any thoughts or guidance you can offer!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Permission denied issue in checkout@v4 in .github/workflows/deploy-production.yml
to give the 'github' account for the superuser, I applied this command for deployment.
but it works only once time
So I changed the account for github runner as a root not 'github' account like the above.
Description
Hi full stack fastapi template project team,
First off, thanks for maintaining this project — it’s been really helpful.
I'm setting up a production deployment workflow using a self-hosted GitHub Actions runner as deployment.md wirtten, and I encountered an issue related to file permissions when using
actions/checkout@v4
.The project documentation mentions creating a
github
user for the runner and running the GitHub Actions service under that account. However, during initial setup, I installed the runner with superuser (root
) privileges. As a result, some Python.pyc
files generated inside a Docker container (running asroot
) are owned byroot
, which leads to this error during thecheckout@v4
cleanup step:Error: File was unable to be removed Error: EACCES: permission denied, unlink '/home/github/actions-runner/_work/.../__pycache__/__init__.cpython-310.pyc'
After some investigation, I traced the issue back to a mismatch in ownership — the
github
user (running the Actions runner) doesn't have permission to remove files created byroot
.To fix it, I ran:
but it works only once time, so I changed the acount for github action runner
This resolved the issue, but I wanted to clarify a couple of things:
deployment.md
, or is it something other users are also likely to encounter in similar setups?github
user account for the self-hosted runner?root
(which has its own security risks)?Appreciate any thoughts or guidance you can offer!
Operating System
Linux
Operating System Details
ubuntu 22.04 in AWS EC2
Python Version
4.10
Additional Context
github action checkout issue: actions/checkout#1720
my github issue: limJhyeok/Essay-Feedback-Writer#25
Beta Was this translation helpful? Give feedback.
All reactions