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

Creating a symlink on Windows fails for regular users #15

Open
prantlf opened this issue Feb 9, 2015 · 0 comments
Open

Creating a symlink on Windows fails for regular users #15

prantlf opened this issue Feb 9, 2015 · 0 comments

Comments

@prantlf
Copy link

prantlf commented Feb 9, 2015

Creating a symbolic link (hardlink) on Windows is a privileged operation. The operation fails with ERROR_ACCESS_DENIED if the SE_CREATE_SYMBOLIC_LINK_NAME has not bee granted, which only administrators have by default. Any user can create a directory junction (soft link) providing the file system permissions allow it.

While it can requested, that the user running Grunt has been granted the necessary privilege, it would be an additional step for the build environment and an exception from company policies would be needed. This can be saved, because junctions are mostly exactly what is needed on Windows.

The NodeJS symlink creation method offers the 'junction' type to solve the problem. The pull request #11 enables junction creation for this task without breaking current scenarios. It could be modified to use the special directory link mode only on Windows platform, if you found it better.

You may consider adding the force option too, to let the Grunt ignore errors, which are not critical for the build (pull request #14).

@prantlf prantlf changed the title Creating a symlink Windows fails for regular users Creating a symlink on Windows fails for regular users Feb 9, 2015
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

No branches or pull requests

1 participant