Problems with permissions and php suexec

BigBirdy

Active Member
Jun 10, 2007
28
0
151
I have a hosting solution which is running ,WHM 11.2.0, cPanel 11.6.0-R15076 on CentOS 4.3. Recently I rebuilt apache with PHP 5.2.1, and both :PHP suEXEC Support" and "suEXEC Module" checked. I am certain that once this was done everything was working fine meaning that each account would have permissions of username.nobody for the folder /home/username/public_html and all files/folders in public_html were owned by username.username.

Most hosts are running Joomla and although I can load a phpinfo.php file in any users web root and chown it username.username and it will load fine, and their web sites "seem" to be running fine, when I go into the Joomla administration area, "System Info" nothing is writeable? If I set all files/folders to nobody.nobody, then everything shows as writeable in the Joomla System Info area?

The support staff at my hosting site have been unable to solve this issue so can anyone possibly suggest some additional debuging I can do to get this resolved and ensure that php scripts are truly running as the account owners.

I also have another hosting server elsewhere which is identically configured with the exception of the os, in this case it is RHEL5. When I check phpinfo for the build options for php, they are radically different although I selected the same options on both servers? For instance, on the "broken" server, although I set php to 5.2.4 it still shows as being 5.2.1 and there are many build differences.

Working Server (RHEL5)

'./configure' '--prefix=/usr' '--with-xml' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--enable-discard-path' '--with-pear' '--enable-sockets' '--enable-track-vars' '--with-zlib'

Server API CGI

Non-Working Server (CentOS 4.3)

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--prefix=/usr/local' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-iconv' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--enable-magic-quotes' '--with-mysqli' '--with-mysql=/usr' '--with-snmp' '--enable-ucd-snmp-hack' '--enable-discard-path' '--with-pdflib' '--with-pear' '--with-pspell' '--enable-sockets' '--enable-track-vars' '--with-xmlrpc' '--with-zlib'

Server API Apache
 
Last edited:

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,577
51
308
cPanel Access Level
Root Administrator
Aside from the ownership, what are the actual permissions of the directory(ies) in question?

i.e. What does ls -la show?
 

BigBirdy

Active Member
Jun 10, 2007
28
0
151
Well it looks like some of the problem was due to a failed yum update which led to failed or incomplete apache and php updates. Php suexec seems to be working fine now, Apache "Server API" now shows as "CGI" and I can see php processes starting under account owner names when their sites load. However, performance is REALLY bad and I see in top the php process for any given site going to %75-%90 CPU? Can any suggest any performance tweaks?