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.
-
Issue Description
On macOS, Running
mkdirat(., ., 0)
(first arguments irrelevant, except that the parent directory is on a virtiofs mount) inside a continer fails withEACCES
when a vfkit-based machine is used. I have not tested other types of machine (e.g. libkrun).This issue arises when running
useradd --create-home
indebian:bookworm-20240513-slim
, which is used as part of the Redox build process here.useradd
usesmkdir
(rather thanmkdirat
) here and suffers the same failure.I believe the underlying issue is with Apple's virtiofs implementation; I have
FB16008360
open 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 init
podman machine start
podman machine ssh
cd /Users/${MACOS_USERNAME}
mkdir -m0 foo
ls
Describe the results you received
mkdir
fails with a permissions error, but the directory is successfully created;strace
, not present on the FCOS image, shows themkdirat
syscall 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
EACCES
comes from, I ran Alpine Linux Virt 3.20 invfkit
directly. I built a custom Kernel to add some additionalpr_debug
instrumentation around the relevant parts of the FUSE and virtiofs implementations.This patch was applied to Linux v6.6.63.
A
vfkit
VM 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
EACCES
error is the FUSE server backing thevirtiofs
mount; in this context, the server is the macOS Virtualization Framework via aVZVirtioFileSystemDeviceConfiguration
, so I have raised an issue with Apple.Note that the
mkdirat_test
is necessary rather than just runningmkdir -m0 foo
because Alpine's busyboxmkdir
does a two stagemkdir
/chmod
rather than usingmkdirat(., ., 0)
.Beta Was this translation helpful? Give feedback.
All reactions