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

[WSL2] Deno Permission denied (os error 13) #13141

Closed
mrxiaozhuox opened this issue Dec 19, 2021 · 3 comments
Closed

[WSL2] Deno Permission denied (os error 13) #13141

mrxiaozhuox opened this issue Dec 19, 2021 · 3 comments

Comments

@mrxiaozhuox
Copy link

I have try to use deno start a http-web-server on WSL:

error: Uncaught (in promise) PermissionDenied: Permission denied (os error 13)
  const listener = Deno.listen(addr);
    at Object.opSync (deno:core/01_core.js:149:12)
    at opListen (deno:ext/net/01_net.js:38:17)
    at Object.listen (deno:ext/net/01_net.js:204:17)
    at serve (https://deno.land/[email protected]/http/server.ts:303:25)
    at new DenlyHttp (https://deno.land/x/[email protected]/core/server/http.ts:37:32)
    at new Denly (https://deno.land/x/[email protected]/core/denly.ts:129:29)
    at file:///home/mrxiaozhuox/projects/dodot/mod.ts:11:13

if I use sudo to run the deno, its ok. But I think it is not a normal state:

sudo ~/.deno/bin/deno -A mod.ts

(Because I don't need use sudo start a server on my macbook, but I need it on WSL, so I think this is a bug.

@mrxiaozhuox
Copy link
Author

I have try to change deno file owner to root, but it is not work:

sudo chown root:root ~/.deno/bin/deno

@bartlomieju
Copy link
Member

This is not a problem with a file/exe not being owned by root, but by the fact that you are trying to connect to the port that requires root access (most likely port 80). Does the problem still happen if you change the port?

@mrxiaozhuox
Copy link
Author

This is not a problem with a file/exe not being owned by root, but by the fact that you are trying to connect to the port that requires root access (most likely port 80). Does the problem still happen if you change the port?

oh, thanks.

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

2 participants