Issue
I am running MacOS X with python 3. The folder and files have 755 but I have also tested it in 777 with no luck. My question is if I have the right permissions why does it not let me run without sudo. Or are my settings incorrect?
cris-mbp:ProjectFolder cris$ python3 zbo.py
Traceback (most recent call last):
File "zbo.py", line 9, in <module>
app.run(host="127.0.0.1",port=81,debug=True)
File "/usr/local/lib/python3.5/site-packages/flask/app.py", line 843, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python3.5/site-packages/werkzeug/serving.py", line 677, in run_simple
s.bind((hostname, port))
PermissionError: [Errno 13] Permission denied
cris-mbp:ProjectFolder cris$ sudo python3 zbo.py
* Running on http://127.0.0.1:81/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger pin code: 106-133-233
Solution
You're trying to run the app on a privileged port (81) - if you use a higher port such as 5000 you won't need sudo privileges.
Answered By - Matt Healy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.