Skip to content

runtime/v2: avoid symlink for bundle work dir on Windows#14

Closed
chelnak wants to merge 1 commit intodmcgowan:mainfrom
chelnak:windows_junctions
Closed

runtime/v2: avoid symlink for bundle work dir on Windows#14
chelnak wants to merge 1 commit intodmcgowan:mainfrom
chelnak:windows_junctions

Conversation

@chelnak
Copy link
Copy Markdown

@chelnak chelnak commented Feb 27, 2026

Creating symlinks on Windows requires administrator privileges or Developer Mode.

This change replaces the direct os.Symlink/os.Readlink calls with platform-specific helpers:

  • Unix keeps the existing symlink behavior
  • Windows creates a directory junction using go-winio, which does not require elevated privileges.

os.Readlink works for both symlinks and junctions, so resolveWorkLink uses it on both platforms.

Creating symlinks on Windows requires administrator privileges or
Developer Mode. Replace the direct os.Symlink/os.Readlink calls with
platform-specific helpers: unix keeps the existing symlink behavior,
while Windows creates a directory junction using go-winio, which does
not require elevated privileges.

os.Readlink works for both symlinks and junctions, so resolveWorkLink
uses it on both platforms.

Fixes "A required privilege is not held by the client" error when
creating containerd tasks on Windows without elevated privileges.
@chelnak chelnak closed this Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant