Replies: 3 comments 3 replies
-
|
I would assume this is the same issue as I already described here: #23018 If anything chmod 0 any file/dir it will not longer be accessible as we launch the VM (thus virtofs) as user so there is no way to read such a file on the host. |
Beta Was this translation helpful? Give feedback.
-
They may share a common cause somewhere inside Apple's I could imagine that Apple's FUSE implementation of |
Beta Was this translation helpful? Give feedback.
-
|
I mean sure but fundamentally this is up to the apple implementation. I don't see what podman machine can do about that so I move this to discussion |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
On macOS, Running
mkdirat(., ., 0)(first arguments irrelevant, except that the parent directory is on a virtiofs mount) inside a continer fails withEACCESwhen a vfkit-based machine is used. I have not tested other types of machine (e.g. libkrun).This issue arises when running
useradd --create-homeindebian:bookworm-20240513-slim, which is used as part of the Redox build process here.useraddusesmkdir(rather thanmkdirat) here and suffers the same failure.I believe the underlying issue is with Apple's virtiofs implementation; I have
FB16008360open with Apple to track this. Please see "Additional information" below.Steps to reproduce the issue
Steps to reproduce the issue
podman machine reset && podman machine initpodman machine startpodman machine sshcd /Users/${MACOS_USERNAME}mkdir -m0 foolsDescribe the results you received
mkdirfails with a permissions error, but the directory is successfully created;strace, not present on the FCOS image, shows themkdiratsyscall failing with-EACCES).Describe the results you expected
Either:
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Apple Silicon M3 Max (aarch64), Sequoia 15.1.1.
Additional information
To try to isolate where exactly the
EACCEScomes from, I ran Alpine Linux Virt 3.20 invfkitdirectly. I built a custom Kernel to add some additionalpr_debuginstrumentation around the relevant parts of the FUSE and virtiofs implementations.This patch was applied to Linux v6.6.63.
A
vfkitVM running Alpine Linux with the patched Kernel was run with--device virtio-fs,sharedDir="${SCRATCH_DIR}"/,mountTag=vfkit-share, and the following experiment performed:We see that the source of the
EACCESerror is the FUSE server backing thevirtiofsmount; in this context, the server is the macOS Virtualization Framework via aVZVirtioFileSystemDeviceConfiguration, so I have raised an issue with Apple.Note that the
mkdirat_testis necessary rather than just runningmkdir -m0 foobecause Alpine's busyboxmkdirdoes a two stagemkdir/chmodrather than usingmkdirat(., ., 0).Beta Was this translation helpful? Give feedback.
All reactions