8

There maybe previous answers to this, So redirect me please, if that's the case I was thinking of running flask on port 80, so I checked if anything is using port 80, as it turns out nothing is running of port 80, so when I type this:

if __name__ == '__main__':  
    app.run(debug=True, host='192.168.4.1' port=int("8081"))

This gives me the web page I want to display, But when I switch to this:

if __name__ == '__main__':  
    app.run(debug=True, host='192.168.4.1' port=int("80"))

I am getting:

PermissionError : [Errno 13] Permission denied

Is there any issue with giving flask or python3 root privileges?

Wan Street
  • 145
  • 1
  • 1
  • 10

1 Answers1

21

You need root to run at port 80.

sudo python app.py

uwevil
  • 660
  • 6
  • 12