-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
container create failed: container_linux.go:336: starting container process caused "setup user: permission denied" #1980
Comments
Definitely looks like some sort of failure in Unfortunately the amount of debugging in runc code paths like this is extremely small, so we can't tell exactly where the permission denied is coming from easily from the error message, which is sad |
If you leave Enforced mode in SElinux it works fine. Let me see why I didn't see the alert. |
found 1 alerts in /var/log/audit/audit.logSELinux is preventing /usr/bin/runc from setattr access on the fifo_file . ***** Plugin catchall (100. confidence) suggests ************************** If you believe that runc should be allowed setattr access on the fifo_file by default. ausearch -c 'runc:[2:INIT]' --raw | audit2allow -M my-runc2INITsemodule -i my-runc2INIT.ppAdditional Information: Raw Audit Messages type=SYSCALL msg=audit(1544550755.385:1130): arch=x86_64 syscall=fchown success=yes exit=0 a0=2 a1=a5c2 a2=0 a3=0 items=0 ppid=77911 pid=77923 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=runc:[2:INIT] exe=/usr/bin/runc subj=system_u:system_r:container_runtime_t:s0 key=(null) Hash: runc:[2:INIT],container_runtime_t,unconfined_service_t,fifo_file,setattr |
ping @rhatdan ^ |
In container-selinux we already have |
@EmilienM What service is running as unconfined_service_t? ps -eZ | grep unconfined_service_t |
@rhatdan |
conmon should not be running as a unconfined_t service, I think this means that you launched podman from a systemd unit file, and podman was not labeled correctly? |
@rhatdan yes, this is exactly my bug: when running containers from systemd I have this AVC. See containers/container-selinux#59 |
Is this only happening in the test suite, where it is running a mislabeled podman? |
@rhatdan it's happening for us in OpenStack when we run SElinux in Enforced mode and control containers with Systemd. I've been adding this scenario in Podman testsuite too: #1987 and #2002 so we catch it earlier next time. |
The default `container-selinux` policies as provided by CentOS (2.74) are not compatible with `containerd`/`runc` (AVC denials when `runc` attempts to `setattr` on `fifo_file` resources, see links below). This PR forces the install of a third-party package (so this introduces some technical debt...), and includes a simple test-script (to be invoked manually) to check `containerd` is working correctly. Fixes: #573 See: containers/podman#1980 See: containers/container-selinux@ae6e25b
The default `container-selinux` policies as provided by CentOS (2.74) are not compatible with `containerd`/`runc` (AVC denials when `runc` attempts to `setattr` on `fifo_file` resources, see links below). This PR forces the install of a third-party package (so this introduces some technical debt...), and includes a simple test-script (to be invoked manually) to check `containerd` is working correctly. Fixes: #573 See: containers/podman#1980 See: containers/container-selinux@ae6e25b
The default `container-selinux` policies as provided by CentOS (2.74) are not compatible with `containerd`/`runc` (AVC denials when `runc` attempts to `setattr` on `fifo_file` resources, see links below). This PR forces the install of a third-party package (so this introduces some technical debt...), and includes a simple test-script (to be invoked manually) to check `containerd` is working correctly. Fixes: #573 See: containers/podman#1980 See: containers/container-selinux@ae6e25b
Is this a BUG REPORT or FEATURE REQUEST?:
[//]: # kind bug
Description
Systemd fails to start containers with a permission error.
Steps to reproduce the issue:
Deploy podman 0.12.1.1 and configure a systemd service to start a container (example in this blog post).
Start the container with
podman start
, it works.Start the container with systemd, it fails with permission error.
Describe the results you received:
Describe the results you expected:
In podman 0.11.1, the container start from systemd successfully.
Output of
podman version
:Output of
podman info
:The text was updated successfully, but these errors were encountered: