main.py returns error 13 permission denied when running on ubuntu 22.04 #3043
Unanswered
abhandari73
asked this question in
Q&A
Replies: 1 comment
-
By default you are not allowed to start services on port 80 as a normal user. You could use tools like setcap, authbind or iptables. An other alternative would be a reverse proxy running as root which serves your app which then can run on a different port. We often use a third way via docker. This works because docker runs as root and we can bind the internal port (say 8080) to the outside port 80. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I have a web server running on my local machine - apache2 on ubuntu and i can see the static pages and php pages from outside the network. I created a basic script to be rendered on the webpage but when i run python3 main.py from the directory in which the script is saved i get Error 13 Permission denied. I changed the permissions to 775. I am running with admin privileges.
The code is as below:
What am I doing wrong and why is it not being rendered on the apache server
Beta Was this translation helpful? Give feedback.
All reactions