-
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
Can't get writable cgroups inside container without --priveleged #8441
Comments
@umohnani8 PTAL |
I think adding an option to I think we should not do it by default. Creating cgroups can be expensive, we have the same issue with systemd not delegating the cpu controller to rootless users, and a malicious container could take advantage of it. |
@umohnani8 Since you are already in the --security-opt code, could you look into adding this feature. How about Should this only be available to cgroups V2? (That is where I am leaning). |
yes, probably it is a good idea to allow it only for cgroups v2. If there is any need for cgroup v1 we can always add it later |
A friendly reminder that this issue had no activity for 30 days. |
@umohnani8 Do you have a chance to look at this? @giuseppe would you like to work on it? |
A friendly reminder that this issue had no activity for 30 days. |
@umohnani8 @giuseppe Might have got lost during Holiday Break. |
A friendly reminder that this issue had no activity for 30 days. |
I just ran these commands as rootless and it seems to work for me.
|
$ podman -v |
@rhatdan |
oops.
This should work. |
@rhatdan From the description, it looks like it won't be overcomplicated. |
Proposed solution presented in PR |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind feature
Description
Containerised app uses cgroups v2 for sandboxing internally (runs untrusted code).
Podman run
exposes cgroups but they are RO, unless I pass--priveleged
. The latter seems excessive though. Would be nice if it was possible to request writable cgroups via e.g.--security-opt
.Steps to reproduce the issue:
podman run alpine mkdir /sys/fs/cgroup/eee
Describe the results you received:
Describe the results you expected:
(succeeds)
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
VirtualBox
The text was updated successfully, but these errors were encountered: