curroy

Registered
Jan 18, 2021
3
0
1
Champaign, IL
cPanel Access Level
Website Owner
Hello All,

I am trying to deploy a Flask app on our cPanel server. I have followed the instructions (as far as I know) listed here. I was able to set up the passenger_wsgi.py file as described and installed all dependencies. The Python app appears to be running.

When I navigate to my api in my browser, I am getting the following error:

Code:
An error occurred while trying to access '[path]/passenger_wsgi.py': Cannot stat '[path]/passenger_wsgi.py': Permission denied (errno=13)

Apache doesn't have read permissions to that file. Please fix the relevant file permissions.
I have verified that [path] is the correct path to my repository. Additionally I checked the file permissions for the file [path]/passenger_wsgi.py in the cPanel File Manager. It looks like all permissions are enabled as shown in the attached screenshot.

I am hoping that someone can point me in the right direction.

Thanks in advance.
 

Attachments

Last edited by a moderator:

cPJustinD

Administrator
Staff member
Jan 12, 2021
33
12
83
Houston
cPanel Access Level
Root Administrator
Hey there! In doing some research into the error, I've found the following posts which suggest that the error may have something to do with some files or directories not being executable:


If these posts don't contain the information to help resolve the issue, please submit a support request so that our analysts may take a closer look and review the permissions of the file and its directory.
 

curroy

Registered
Jan 18, 2021
3
0
1
Champaign, IL
cPanel Access Level
Website Owner
Hello Justin,

Thanks for your reply. The permissions for passenger_wsgi.py are set to 655 as suggested in the second post you linked, and passenger_wsgi.py is executable. I will submit a support ticket. Thanks for your quick response.
 

curroy

Registered
Jan 18, 2021
3
0
1
Champaign, IL
cPanel Access Level
Website Owner
Sorry, I meant to update this thread when I had resolved my problem, but it slipped my mind. I spoke to a colleague who was able to help resolve the issue, and I never ended up filing the ticket.

The issue was that the upstream directories did not have the correct permissions. In particular, they were set to 755 and changing to 644 did the trick.