jerrybell

Well-Known Member
Nov 27, 2006
90
0
156
I just configured apache to use suphp on my whm/cpanel. I'm having a hard time understanding something - I have to have permissions on my web files and directories set to 755. BUT, isn't the point of suphp that it runs the scripts as the user set in the httpd.conf file?

Am I missing something?
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
I just configured apache to use suphp on my whm/cpanel. I'm having a hard time understanding something - I have to have permissions on my web files and directories set to 755. BUT, isn't the point of suphp that it runs the scripts as the user set in the httpd.conf file?

Am I missing something?
PHP scripts will be executed as the user, but not non-PHP items like static HTML, images etc.

Note, if a script is informing you that permissions must be set to 755, note that the script may not be scripted to be aware of SuPHP (or phpSuExec) environments.
 

jerrybell

Well-Known Member
Nov 27, 2006
90
0
156
thanks for the fast response!

It makes sense that non php files have to be 755. The scripts are not complaining, but they just bomb out unless they have at least 755.

I had the impression that suphp would allow me to effectively prevent one customer from being able to read the files of another, but it seems like that is not the case.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
thanks for the fast response!

It makes sense that non php files have to be 755. The scripts are not complaining, but they just bomb out unless they have at least 755.

I had the impression that suphp would allow me to effectively prevent one customer from being able to read the files of another, but it seems like that is not the case.
That's weird, when you first mentioned this I took the index.php of a production WordPress site, changed it to 0700 and everything kept on working just fine (haven't changed it back either).

How exactly is the script bombing out? Server 500 error or the script itself checking its own permissions and arbitrarily determining it needs 755 permissions?
 

jerrybell

Well-Known Member
Nov 27, 2006
90
0
156
It is working as expected now. I can set the permissions to 750 on .php files and it works.

Disappointingly, it is MUCH slower when running suphp, but I guess that's the price of security.