Permissionerror: [Errno 13] Permission Denied Flask.Run()

PermissionError: [Errno 13] Permission denied Flask.run()

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.

Flask PermissionError: [Errno 13] Permission denied

Since I had installed the Python 3.5 separately in a different path, I had to place the following shebang at the top of my file to fix the issue:

#!/opt/mount1/python35/bin/python3.5

Permission denied while using flask

You're getting that error because you're using a Privileged Port.

The TCP/IP port numbers below 1024 are special in that normal users
are not allowed to run servers on them.

...

When you run a server as a test from a non-priviliged account, you
will normally test it on other ports, such as 2784, 5000, 8001 or
8080.

Change your port to 5000, for example, and that will fix your problem.

PermissionError: [Errno 13] Permission denied: when uploading a file using Python and Flask

Issue was fixed.

  1. used app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER to set the upload folder
  2. followed below example exactly as decribed.
    https://flask.palletsprojects.com/en/2.0.x/patterns/fileuploads/

PermissionError: [Errno 13] Permission denied on mac

The port 80 is considered as privileged port(TCP/IP port numbers below 1024) so the process using them must be owned by root. When you run a server as a test from a non-priviliged account, you have to test it on other ports, such as 2784, 5000, 8001 or 8080.

You could either run the python process as root or you have to use any non privileged port to fix this issue.


server = ('localhost', 8001)
httpd = HTTPServer(server, RequestHandler)
httpd.serve_forever()

PermissionError: [Errno 13] Permission denied in Ubuntu with flask

Can you go to the project folder /var/www/webApp/webApp/ and run

sudo chmod 777 -Rv static


Related Topics



Leave a reply



Submit