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

EPERM for clients connecting via named pipe #19154

Closed
computerquip-streamlabs opened this issue Mar 5, 2018 · 4 comments
Closed

EPERM for clients connecting via named pipe #19154

computerquip-streamlabs opened this issue Mar 5, 2018 · 4 comments

Comments

@computerquip-streamlabs
Copy link

Platform: Windows 10
Node: 8.9.4
Subsystem: Net

We sometimes must launch our application as administrator. When we do, clients attempting to connect to our application over a named pipe (which was created during a call to server.listen()) that are not run as administrator are no longer able to connect. We have no known way of change permissions of our handle to make sure it can be written to from a non-administrator process.

@computerquip-streamlabs computerquip-streamlabs changed the title EPERM for connection clients when run as administrator mode EPERM for clients connecting via named pipe Mar 5, 2018
@gireeshpunathil
Copy link
Member

we recently added a chmod facility for pipes through libuv/libuv#1386 in libuv, though I am not sure whether we have made an abstraction around it in node, and whether it covers windows platform.
/cc @bzoz

@computerquip-streamlabs
Copy link
Author

There appears to be code there for Windows but I don't see a way to use it from Node.

@bzoz
Copy link
Contributor

bzoz commented Mar 6, 2018

Yep, we need to add mappings to Node. I'll do this.

@bzoz
Copy link
Contributor

bzoz commented Mar 8, 2018

I've gave it a shot (JaneaSystems@74c72e0), but this does not work. Node client fails with ENOTCONN when trying to read from pipe, maybe because of this line: https://github.com/libuv/libuv/blob/88c2af0e65ed49ff599f5afd4bf952ecdfab4594/src/win/pipe.c#L2122.

bzoz added a commit to JaneaSystems/node that referenced this issue May 17, 2018
Adds mappings to uv_pipe_chmod call by adding two new options to
listen call. This allows the IPC server pipe to be made readable or
writable by all users.

Fixes: nodejs#19154
@bzoz bzoz closed this as completed in 531b4be May 24, 2018
targos pushed a commit that referenced this issue May 25, 2018
Adds mappings to uv_pipe_chmod call by adding two new options to
listen call. This allows the IPC server pipe to be made readable or
writable by all users.

Fixes: #19154

PR-URL: #19472
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
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.

3 participants