Skip to content

Mounts under symlinks may result in unexpected behavior for directory #3269

Closed

Description

@sipsma

(This needs to be verified, it should be true in theory but hasn't been tried yet)

When using the Container API, if a mount is placed under a path containing a symlink, it's possible to create situations where:

  1. a directory in the container during an exec op shows some contents
  2. use of the directory API to get the contents of that path returns something completely different

Described more here: #3217 (comment)

Possible solutions:

  1. Implement essentially a full blown VFS where we actually identify and account for symlinks in the rootfs and mounted filesystems
  2. Reimplement the logic of directory to figure out the real path by actually creating a container (with execop or gateway container). Essentially use the kernel to do the VFS calculations

Both of those options are pretty bad, hence why this (hopefully obscure) problem is not worth immediately solving.

Activity

  1. added
    area/engine
    and removed on Dec 5, 2022
  2. locked and limited conversation to collaborators on Mar 24, 2026
  3. converted this issue into a discussion #12076 on Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions