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

PermissionError: [Errno 13] error while attempting to bind on address ('0.0.0.0', 80): permission denied #5

Closed
zahash opened this issue May 7, 2020 · 8 comments

Comments

@zahash
Copy link

zahash commented May 7, 2020

No description provided.

@nandahkrishna
Copy link
Member

On Windows, hosting a server on port 80 (which Airshare uses as default) is blocked. You might want to change the port using the --port flag or change your system settings to open port 80.

@zahash
Copy link
Author

zahash commented May 7, 2020

but I use Ubuntu

@zahash
Copy link
Author

zahash commented May 7, 2020

It's transferring the files after changing the port but not displaying anything on the local server

@nandahkrishna
Copy link
Member

If you change the port, you must access the server using code.local:port, for example, zahash.local:8000.

As for the port 80 issue, once again ensure that port 80 is open (check ufw). If it is, then ensure you don't have any other applications running on port 80 - this could be something like XAMPP, etc.

@nandahkrishna
Copy link
Member

Closing this as a solution has been provided.

@paperbenni
Copy link

paperbenni commented Jun 7, 2020

I would suggest changing the default port on Linux to something that doesn't require any extra privileges when not running as root.
Running Airshare as root also makes any files uploaded to it owned by root and you also shouldn't run random python scripts as root.
I get that adding :8080 to the end of the url doesn't look pretty but the http://code.local is pretty unreliable anyway, so if most people end up using the ip adress, there's not much harm done.

@nandahkrishna
Copy link
Member

I had my reservations regarding this as it would make the URLs a little harder to type and less "pretty", but I've gone ahead and changed the default port to 8000. We shouldn't be using the restricted ports (below 1000), and this change will probably save us a lot of Bind Error issues.

The addition of just 4 digits for the port number, to the URL isn't too big a deal breaker for me. So, I'm content now that the change has been made (and is part of version 0.1.6 as it's important and required immediate release). Hopefully it reduces the number of duplicate port issues we receive.

Beyond that, if someone does want to use port 80, by all means they are free to do so using the -p flag.

Thanks @mohanpierce99 and @paperbenni.

@AK5123 AK5123 unpinned this issue Jun 10, 2020
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

4 participants
@paperbenni @nandahkrishna @zahash and others