-
Notifications
You must be signed in to change notification settings - Fork 324
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
OCI Permission Denied when running on host with VirtualBox #995
Comments
can your user access that file? What is the output of the commands |
closing the issue since I've got no answer to my previous question. Please reopen if the issue persists and you've more information to share |
@giuseppe I am experiencing the same issue and running the command you suggested outputs the following for me: stat /dev/vboxusb/001/ 163ms 10:56:17 PM
File: /dev/vboxusb/001/
Size: 120 Blocks: 0 IO Block: 4096 directory
Device: 0,5 Inode: 530 Links: 2
Access: (0750/drwxr-x---) Uid: ( 0/ root) Gid: ( 973/vboxusers)
Context: system_u:object_r:device_t:s0
Access: 2023-02-08 22:56:14.848548137 -0500
Modify: 2023-02-08 22:03:03.922543581 -0500
Change: 2023-02-08 22:03:03.922543581 -0500
Birth: 2023-02-07 00:41:48.210999823 -0500 id
uid=1000(fedora) gid=1000(fedora) groups=1000(fedora),10(wheel),36(kvm),971(lxd),973(vboxusers),977(libvirt) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 podman unshare stat /dev/vboxusb/001/ 150ms 10:56:12 PM
File: /dev/vboxusb/001/
Size: 120 Blocks: 0 IO Block: 4096 directory
Device: 0,5 Inode: 530 Links: 2
Access: (0750/drwxr-x---) Uid: (65534/ nobody) Gid: (65534/ nobody)
Context: system_u:object_r:device_t:s0
Access: 2023-02-08 22:56:14.848548137 -0500
Modify: 2023-02-08 22:03:03.922543581 -0500
Change: 2023-02-08 22:03:03.922543581 -0500
Birth: 2023-02-07 00:41:48.210999823 -0500 |
so that is expected. The device file is owned by a UID/GID that are not mapped inside the user namespace and their mode is 0750 (so no world access). You need to chmod that file to mode 0755 |
I was thinking this was inconsistent behavior, but it's just an incorrect user expectation. I believe the user expectation was that all the container construction is done from the host user namespace, so if there's a folder permissions issue it would prevent usage in the container, but wouldn't prevent the container from running. I went thru the cases of trying to map a file from a folder, assuming no groups are being included into the container. The identical behavior applies for when it's a device node instead of a file.
Given the results, it actually seems odd that the |
When running
crun
withpodman
on a host with VirtualBox, it failes with the messageError: crun: error stat'ing file
/dev/vboxusb/001/006: Permission denied: OCI permission denied
. I checked the selinux audit.log but could not find anything relevent. Hopefully the below information is helpful for troubleshooting.The text was updated successfully, but these errors were encountered: