The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problems with permissions and php suexec

Discussion in 'General Discussion' started by BigBirdy, Aug 13, 2007.

  1. BigBirdy

    BigBirdy Active Member

    Joined:
    Jun 10, 2007
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    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
     
    #1 BigBirdy, Aug 13, 2007
    Last edited: Aug 14, 2007
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    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?
     
  3. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    If nothing is writeable when the ownership is username.username then pure logic dictates that the PHP process is running as nobody, simple as that. In other words, phpsuexec didn't "take" for whatever reason, try again perhaps?
     
  4. BigBirdy

    BigBirdy Active Member

    Joined:
    Jun 10, 2007
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
Loading...

Share This Page