Skip to content

Permission denied is returned when trying to access some host folders mounted in Hyper-V machines #25686

@l0rd

Description

@l0rd

Describe the problem

In Hyper-V machines, by default, the host C:\ drive is mounted in /mnt/c and accessible from a container using a volume (podman run -v C:\anysubfolder ...).

However trying to access some folders such as %HOME% results in a permission denied error:

> podman run -it --rm -v %HOME%:/jeff fedora:41 bash
[root@806658ac8ff1 /]# ls /jeff
ls: reading directory '/jeff/': Permission denied

Other details

Accessing a subfolder of an access denied folder works fine:

[root@806658ac8ff1 /]# ls /jeff/git
...no error...

On a WSL machine the access denied error isn't returned. WSL uses drvfs mounts, Hyper-V uses v9fs (both use the p9 protocol from Plan9).

This behavior is observable on a regualar v5.4.1 Podman installation on Windows. This issue is related to #21036 (see comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions