mknod on Mac fails #22819
Replies: 3 comments 7 replies
-
You cannot use mknod in a user namesapce (rootless container) this is limited by the kernel as mknod is dangerous. You have to run your container as root and give it CAP_MKNOD in order to use mknod, i.e. for podman machine create the machine rootful |
Beta Was this translation helpful? Give feedback.
-
What is the difference between |
Beta Was this translation helpful? Give feedback.
-
If you are on a Mac or Windows, you need to start a podman machine to listen for incoming connections. You can either setup the podman service to listen as non-root (the default), meaning all of the containers will be run in rootless mode. Or if you do You never need to run sudo on the MAC or Windows machines. Running podman commands locally will just connect to the default service and run containers from that user. |
Beta Was this translation helpful? Give feedback.
-
Issue Description
On Mac OS with rootless 5.0.3 podman, when I do
podman machine ssh "sudo mknod abc c 1 8”
the random device abc is created.When I create an image from
docker.io/library/debian:bookworm
sudo mknod
fails, even if I callpodman run --add-cap=CAP_MKNOD
.Steps to reproduce the issue
See above.
Describe the results you received
mknod: Operation not permitted.
Describe the results you expected
There should be some way to create a device with mknod, as mknod works fine within the ”machine”.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
No response
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions