Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

windows: fs.symlink raising EPERM #6342

Closed
appajee opened this issue Oct 12, 2013 · 9 comments
Closed

windows: fs.symlink raising EPERM #6342

appajee opened this issue Oct 12, 2013 · 9 comments

Comments

@appajee
Copy link

appajee commented Oct 12, 2013

Similar to Issue#4952.

$node
> process.version
'v0.10.5'  
> require('fs').symlinkSync(process.execPath,process.cwd() + '/node-symlink', 'file')
Error: EPERM, operation not permitted 'c:\node\node-symlink'

I get same result with two different versions of node that I tried. Obviously only difference is the version shown: 'v0.10.5' (when installed version of node is run), or, with the locally built latest node executable ( 'v0.11.8-pre') on Windows 8 with MS Visual Studio 2012.

@be5invis
Copy link

Do you have enough permission?

@bnoordhuis
Copy link
Member

EPERM means 'permission denied.' The default security policy allows only administrators to create symbolic links.

@appajee
Copy link
Author

appajee commented Oct 14, 2013

Yes, as admin, I am able to create symlink just fine. So this bug report indeed is a user error.

@bnoordhuis
Copy link
Member

By the way, if you're going to deploy on Windows - you can run your application as a regular user, you just need to tweak the security policy a little.

@jorangreef
Copy link

Ben, is it possible to deploy on Windows as a regular user and run as a regular user and tweak the security policy to allow symlinking as you say? How would one do this?

@bnoordhuis
Copy link
Member

http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7 - that's for Windows 7 but the same principle applies to older Windows versions, you adjust the group policy setting.

@jorangreef
Copy link

Thanks Ben

On 11 Jun 2014, at 2:04 PM, joyent/node reply@reply.github.com wrote:

http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7 - that's for Windows 7 but the same principle applies to older Windows versions, you adjust the group policy setting.

Reply to this email directly or view it on GitHub.

@vcernomschi
Copy link

I am using Windows 7 Home Premium and issue is still reproducible after adjusting the group policy setting.

@vcernomschi
Copy link

Found reason why it didn't work for me , because used user was in Administrator group:

Note that this group policy setting has no effect on user accounts that belong to the Administrators group. Those users will always have to run mklink in an elevated environment (as Administrator).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants