Skip to content
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

Ensure all devices under /dev show up with proper ownership #850

Open
ctalledo opened this issue Oct 10, 2024 · 1 comment
Open

Ensure all devices under /dev show up with proper ownership #850

ctalledo opened this issue Oct 10, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@ctalledo
Copy link
Member

Inside a Sysbox container, some devices show up with nobody:nogroup ownership:

/ # ls -l /dev | grep nobody
crw-rw-rw-    1 nobody   nobody      1,   7 Oct 10 01:13 full
crw-rw-rw-    1 nobody   nobody      1,   3 Oct 10 01:13 kmsg
drwxrwxrwt    2 root     nobody          40 Oct 10 02:11 mqueue
crw-rw-rw-    1 nobody   nobody      1,   3 Oct 10 01:13 null
crw-rw-rw-    1 nobody   nobody      1,   8 Oct 10 01:13 random
crw-rw-rw-    1 nobody   nobody      5,   0 Oct 10 02:41 tty
crw-rw-rw-    1 nobody   nobody      1,   9 Oct 10 01:13 urandom
crw-rw-rw-    1 nobody   nobody      1,   5 Oct 10 01:13 zero

This is not ideal and sometimes causes problems (e.g., issue #839 ).

Ideally all these devices would show up with root:root ownership, as they would on a real host.

This likely requires that Sysbox intercept the mknod system call inside the container, as otherwise this syscall is blocked within the Sysbox container's user namespace.

@ctalledo ctalledo self-assigned this Oct 10, 2024
@ctalledo ctalledo added the enhancement New feature or request label Oct 10, 2024
@rodnymolina
Copy link
Member

Either that, or we run mknod in the init namespaces (through sys-mgr) and bind-mount these nodes into each container. I like the idea of intercepting mknod though since it offers a better virtual-host abstraction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants