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

Arm actions running runs as root and not the runner user #60

Closed
theofficialgman opened this issue Nov 9, 2022 · 7 comments · Fixed by #66
Closed

Arm actions running runs as root and not the runner user #60

theofficialgman opened this issue Nov 9, 2022 · 7 comments · Fixed by #66

Comments

@theofficialgman
Copy link
Contributor

theofficialgman commented Nov 9, 2022

github actions runs with passwordless sudo as a non-root user.

arm-runner-action runs as root (uid=0(root) gid=0(root) groups=0(root) root) and makes performing commands not the same as if it were run within the standard ubuntu actions (uid=1001(runner) gid=121(docker) groups=121(docker),4(adm),101(systemd-journal) runner).

this should be corrected so that arm-runner-action runs as the runner user with passwordless sudo enabled.

theofficialgman added a commit to Botspot/pi-apps that referenced this issue Nov 9, 2022
@pguyot
Copy link
Owner

pguyot commented Nov 12, 2022

I'm ok with it, however this is a breaking change and probably should be an option.

@theofficialgman
Copy link
Contributor Author

theofficialgman commented Dec 28, 2022

any update on this? I would like if this could be a feature so that it can be used at pi-apps (Botspot/pi-apps@c4f8d64) to be used for automated testing of our automatic update github actions script.

@pguyot
Copy link
Owner

pguyot commented Jan 7, 2023

runner user usually wouldn't exist on the target image, in your case raspios_lite:2021-05-07.

I am adding a new option to specify the user but you will have to make sure it exists on the image. And if you are using passwordless sudo that it has this capability.

@theofficialgman
Copy link
Contributor Author

theofficialgman commented Jan 7, 2023

I added this already to my fork for my needs (adding passwordless sudo, adding the new user and groups as necessary). no configuration options but it wasn't necessary for me
main...theofficialgman:arm-runner-action:main

@pguyot
Copy link
Owner

pguyot commented Jan 7, 2023

This supposes the target image has sudo installed and therefore should definitely be an option.
Do you mean to create a PR with an option so this can be integrated in this repository? Or should I merge #66 instead?

@theofficialgman
Copy link
Contributor Author

I don't intend on creating a PR based on what I have done.
its up to you if you want to add the additional functionality from my changes in a toggleable/configurable way

@pguyot pguyot closed this as completed in #66 Jan 7, 2023
@pguyot
Copy link
Owner

pguyot commented Jan 7, 2023

OK. I'm merging #66 for now as it is creating value and closing this issue.

@pguyot pguyot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2023
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