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

nginx: bind() to 0.0.0.0:80 failed (13: Permission denied) #3097

Closed
1 task done
nexcode opened this issue Jul 13, 2023 · 4 comments
Closed
1 task done

nginx: bind() to 0.0.0.0:80 failed (13: Permission denied) #3097

nexcode opened this issue Jul 13, 2023 · 4 comments
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment

Comments

@nexcode
Copy link

nexcode commented Jul 13, 2023

Steps To Reproduce

Set env vars:
BW_PORT_HTTP: 80
BW_PORT_HTTPS: 443

Launch container with host network mode...

Logs in container (/var/log/nginx# tail -n 10 error.log):

2023/07/13 15:19:29 [emerg] 69#69: bind() to 0.0.0.0:80 failed (13: Permission denied)
2023/07/13 15:19:31 [emerg] 110#110: bind() to 0.0.0.0:80 failed (13: Permission denied)
2023/07/13 15:19:34 [emerg] 128#128: bind() to 0.0.0.0:80 failed (13: Permission denied)
2023/07/13 15:19:38 [emerg] 143#143: bind() to 0.0.0.0:80 failed (13: Permission denied)

Expected Result

Access rights to ports below 1024 for nginx

Actual Result

No access rights to ports below 1024 for nginx

Screenshots or Videos

No response

Additional Context

No response

Githash Version

nginx don't work

Environment Details

No response

Database Image

No response

Issue-Link

#2480

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@nexcode nexcode added bug bw-unified-deploy An Issue related to Bitwarden unified deployment labels Jul 13, 2023
@TroyBW
Copy link

TroyBW commented Aug 24, 2023

Hi there,

I attempted to reproduce your issue and was unable to do so. I think your error could have its origin in a permissions misconfiguration. It is expected that privileged ports (1024 and under) are not usually accessible to users/services that do not have root access. In the Bitwarden Unified method, the default ports for the webserver are 8080 and 8443.

We use GitHub issues as a place to track bugs and other development related issues. If your issue persists, please write us back using our contact form, so we can continue troubleshooting: https://bitwarden.com/contact/

You can include a link to this issue in the message content.

Alternatively, you can also search for an answer in our help documentation (https://bitwarden.com/help/) or get help from other Bitwarden users on our community forums (https://community.bitwarden.com/c/support/).

The issue here will be closed.

Thanks!

@djsmith85 djsmith85 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2023
@nexcode
Copy link
Author

nexcode commented Aug 25, 2023

Change the default port to 80 in the settings and try to start the container. There will be this error. This is due to the fact that nginx inside the container does not have enough permissions.

@nexcode
Copy link
Author

nexcode commented Aug 25, 2023

This is necessary in order to start the service with a host network without additional port routing.

@nexcode
Copy link
Author

nexcode commented Aug 25, 2023

Running nginx inside a container with the appropriate permissions does not entail any security issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment
Projects
None yet
Development

No branches or pull requests

3 participants