Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symlinks require admin privileges on windows #52

Closed
Sbozzolo opened this issue May 3, 2024 · 1 comment · Fixed by #58
Closed

Symlinks require admin privileges on windows #52

Sbozzolo opened this issue May 3, 2024 · 1 comment · Fixed by #58

Comments

@Sbozzolo
Copy link
Member

Sbozzolo commented May 3, 2024

ERROR: LoadError: IOError: On Windows, creating symlinks requires Administrator privileges.
symlink("output_0000", "output\\10secs_3600secs_z_elem_20\\output_active"): operation not permitted (EPERM)
Stacktrace:
  [1] uv_error
    @ .\libuv.jl:100 [inlined]
  [2] symlink(target::String, link::String; dir_target::Bool)
    @ Base.Filesystem .\file.jl:1112
  [3] symlink
    @ .\file.jl:1074 [inlined]
  [4] generate_output_path(::ClimaUtilities.OutputPathGenerator.ActiveLinkStyle, output_path::String; context::ClimaComms.SingletonCommsContext{…})
@Sbozzolo
Copy link
Member Author

From
https://github.com/JuliaLang/julia/blob/d01d2561e69822667a8d809064109cd46fba22c1/base/file.jl#L1184-L1258
it looks that it is possible to create links to directories on windows as unpriviledged user using NTFS junction points. This should already happen by default when dir_target = true and absolute paths are used.

@Sbozzolo Sbozzolo changed the title Symlinks required admin privileges on windows Symlinks require admin privileges on windows May 12, 2024
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 a pull request may close this issue.

1 participant