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

--http-addr won't use ports >1023 #201

Open
benrr101 opened this issue Jul 16, 2021 · 2 comments
Open

--http-addr won't use ports >1023 #201

benrr101 opened this issue Jul 16, 2021 · 2 comments

Comments

@benrr101
Copy link

Describe the bug
When I run subspace from the command line and specify that I'd like it to listen to http messages on ports >1023 (eg 8888), subspace will try to bind to port 80. If I try to do the same thing with a port <=1023, it will try to bind to the port I specified.

To Reproduce
Steps to reproduce the behavior:

  1. As a non-root user...
  2. Download the v1.5.0 package, extract, and build
  3. Run subspace --http-host mydomain.com --datadir ~/.subspace --http-addr :8888
  4. Receive error:
INFO[0000] Subspace version: 1.5.0 https://mydomain.com:1025/
FATA[0000] http server on port 80 failed: listen tcp :80: bind: permission denied

Expected behavior
At this stage, I expect a message to appear telling me that subspace is attempting to bind to port 8888.

Screenshots
N/A

Server
I'm building the binary to run without docker.
CentOS 7.8 x86_64
Go 1.16.6

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
My intention was to try to run subspace as a user other than root since I'm used to web servers like apache running as their own user to help isolate the process in case of hacks. This might not be possible anyways since wireguard seems to only like running as root. Nevertheless, this bug seems to preclude me from specifying a port >1023 even if I am running as root.

@metalcated
Copy link

metalcated commented Jul 16, 2021 via email

@benrr101
Copy link
Author

I'm not using root to perform this. I created an account named subspace that I intended to use, similar to apache having an apache user. So, yes, that's why I'm getting the permission denied.

But the error indicates that subspace is ignoring any ports >1023. I tried using :8888 and it failed to bind on port :80. This seems like a bug, or should at least be documented somewhere.

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