Uploaded image for project: 'Container Tools'
  1. Container Tools
  2. RUN-2638

[containers/podman] Permission denied is returned when trying to access some host folders mounted in Hyper-V machines

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • rhel-container-tools

      [2949057796] Upstream Reporter: Mario Loriedo
      Upstream issue status: Open
      Upstream description:

      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:

      Unable to find source-code formatter for language: console. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      > 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:

      Unable to find source-code formatter for language: console. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      [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 https://github.com/containers/podman/issues/21036 (see comment)


      Upstream URL: https://github.com/containers/podman/issues/25686

              Unassigned Unassigned
              upstream-sync Upstream Sync
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: