-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[2.0 regression] Rootless non-root user capability are no longer added #6884
Comments
@rhatdan PTAL |
I meant perhaps this is not a regression and that was actually a bug fix, though that would be quite unfortunate as being able to use |
We add the capability to the bounding set, but not to the individual user. Is the expected hahavior that --cap-add would add NET_ADMIN to the user process, IE CAPEFF? |
A friendly reminder that this issue had no activity for 30 days. |
@TristanCacqueray Are you still interested in this issue. If so answer my question above, please. |
@rhatdan I would expect the |
@rhatdan: Quickly throwing in my opinion: Yes, exactly like you said. Commands like |
And you are saying this used to work? |
@rhatdan I can't tell for Docker, but this used to work with podman 1.x:
|
Well if we supported this in podman 1.* then this is a regression. I kind of like the idea, for when a user specifies a user. |
Yes, I think so. For example if you have this FROM alpine
ENTRYPOINT ["nc"]
CMD ["-lp", "80"]
USER nobody then |
FWIW, I ran into this issue. I had a container that had a capability set, and then later when podman was updated, that capability was no longer honored (because of the --user). I was able to rebuild the container and do a |
@rhatdan, can we revive the issue? |
This has been fixed in master and podman 2.0.6 |
Hi there ! While trying to practice what was explained in this article, I stumbled on this issue. I'm observing this issue on podman 2.1.1, while the previous message says it has been fixed in 2.0.6.
When running a container with "--user" and "--cap-add", the capability is added to the bounding set:
But is not effective:
Can we investigate further why --cap-add is not working with --user ? |
@giuseppe PTAL - from my reading of the code it looks like they should be set, after normalizing by adding the CAP_ prefix? |
Works for me.
|
Daniel, what version of podman?
|
$ podman -v |
@nmasse-itix it looks like you are using 2.1.1, while this seems to be fixed in 2.2.0 as shown by @rhatdan -- can you try 2.2.0 and see if it fixes your issue? |
Thanks a lot @rhatdan, @micah and @mheon ! I don't know where to get the pre-built RPM as shown by @rhatdan. My stock Fedora 33 is still with podman 2.1.1... So I downloaded pre-built podman 2.2.0 from https://cirrus-ci.com/task/5997161601040384.
I can confirm the bug has been fixed in podman 2.2.0 ! Thanks a lot for your help ! 👍 |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Capabilities set using
--cap-add
are no longer added to non-root user.Steps to reproduce the issue:
Describe the results you received:
Capabilities for `1': =
Describe the results you expected:
Capabilities for `1': = cap_net_admin+eip
Additional information you deem important (e.g. issue happens only occasionally):
This got introduced by fe69aa9
The text was updated successfully, but these errors were encountered: