Skip to content

Could not create link: A required privilege is not held by the client #24

@sethreidnz

Description

@sethreidnz

When I ran the command to link a project I got an error that appears to be related to permissions on my machine. I ran again as admin and it worked. Not sure of a solution but perhaps it should be documented that this may occur? Or a more helpful error message like "You may need to link the project as administrator"

Ran command:

nulink link -p -l C:\dev\mg-invocation\Kotahi.MG.Invocation\Kotahi.MG.Invocation.csproj -p Kotahi.MG.Invocation
Failed to create symlink, reverting changes to package folders.

Fatal error: Attempted symbolic link action: create
- from path: [C:\Users\sethr\.nuget\packages\kotahi.mg.invocation\1.0.16\lib]
-   to path: [C:\dev\mg-invocation\Kotahi.MG.Invocation\bin\Debug]
Exception: NuLink.Cli.SymbolicLinkException: Attempted symbolic link action: create
- from path: [C:\Users\sethr\.nuget\packages\kotahi.mg.invocation\1.0.16\lib]
-   to path: [C:\dev\mg-invocation\Kotahi.MG.Invocation\bin\Debug] ---> System.IO.IOException: Could not create link: A required privilege is not held by the client
   at Murphy.SymbolicLink.SymbolicLink.create(String target, String path)
   at NuLink.Cli.SymbolicLinkWithDiagnostics.Create(String fromPath, String toPath) in /home/appveyor/projects/nulink-dr8wu/source/NuLink.Cli/SymbolicLinkWithDiagnostics.cs:line 13
   --- End of inner exception stack trace ---
   at NuLink.Cli.SymbolicLinkWithDiagnostics.Create(String fromPath, String toPath) in /home/appveyor/projects/nulink-dr8wu/source/NuLink.Cli/SymbolicLinkWithDiagnostics.cs:line 17
   at NuLink.Cli.LinkCommand.<>c__DisplayClass2_0.<Execute>g__PerformOperation|5() in /home/appveyor/projects/nulink-dr8wu/source/NuLink.Cli/LinkCommand.cs:line 74
   at NuLink.Cli.LinkCommand.Execute(NuLinkCommandOptions options) in /home/appveyor/projects/nulink-dr8wu/source/NuLink.Cli/LinkCommand.cs:line 30
   at NuLink.Cli.Program.ExecuteCommand(String commandName, NuLinkCommandOptions options, Boolean isValid) in /home/appveyor/projects/nulink-dr8wu/source/NuLink.Cli/Program.cs:line 111

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions