-
Notifications
You must be signed in to change notification settings - Fork 219
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
Supplemental groups not added for process started directly by 'podman exec --user <user>' #608
Comments
This appears to potentially be a podman bug - I asked about supplemental groups on #podman and @mheon pointed me to the part of the code that is supposed to read the supplemental groups for podman exec -u , but it doesn't seem to be working. Filed: containers/podman#9986 |
This bug can still be re-produced by running the snippet provided above. However if one exits the toolbox container and then re-enters, they are able to change ownership properly. |
@owtaylor chased it down the stack and fixed it in crun:
I tried the original reproducer in this issue with group |
Commit 15173f8 exposed a bug in crun(1) [1] where the process started directly by 'podman exec --user ...' inside the Toolbx container would not have the supplementary groups that the user is a member of. This could be observed by differences in id(1): ⬢$ id uid=1000(user) gid=1000(user) groups=1000(user) ⬢$ id user uid=1000(user) gid=1000(user) groups=1000(user),10(wheel) ... and could be worked around by starting a new session with sudo(8). [1] crun commit 9effaebb429a1aed containers/crun@9effaebb429a1aed containers/crun#644 containers/podman#9986 containers#608
I am putting together some tests in #1447 to ensure that this continues to work as expected. |
Commit 15173f8 exposed a bug in crun(1) [1] where the process started directly by 'podman exec --user ...' inside the Toolbx container would not have the supplementary groups attached to the user by the entry point. This could be observed by differences in id(1): ⬢$ id uid=1000(user) gid=1000(user) groups=1000(user) ⬢$ id user uid=1000(user) gid=1000(user) groups=1000(user),10(wheel) ... and could be worked around by starting a new session with sudo(8). [1] crun commit 9effaebb429a1aed containers/crun@9effaebb429a1aed containers/crun#644 containers/podman#9986 containers#608
Describe the bug
When the primary user tries to change the group ownership of a file within a toolbox container it fails with the following error:
chown: changing group of '/tmp/test.1': Operation not permitted
Steps how to reproduce the behaviour
Reproduce error:
Expected behaviour
The change in group ownership would succeed (as it does on the host and on a "normal" podman fedora container).
Actual behaviour
Changing the group ownership fails.
Screenshots
If applicable, add screenshots to help explain your problem.
Output of
toolbox --version
(v0.0.90+)Toolbox package info (
rpm -q toolbox
)Output of
podman version
Podman package info (
rpm -q podman
)Info about your OS
Additional context
Add any other context about the problem here.
When did the issue start occurring? After an update (what packages were updated)?
If the issue is about operating with containers/images (creating, using, deleting,..), share here what image you used. If you're unsure, share here the output of
toolbox list -i
(shows all toolbox images on your system).The text was updated successfully, but these errors were encountered: