Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    28

    Default Problems with permissions and php suexec

    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 by BigBirdy; 08-14-2007 at 01:19 AM. Reason: Additional details

  2. #2
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Aside from the ownership, what are the actual permissions of the directory(ies) in question?

    i.e. What does ls -la show?

  3. #3
    Member brianoz's Avatar
    Join Date
    Mar 2004
    Location
    Melbourne, Australia
    Posts
    1,117
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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. #4
    Member
    Join Date
    Jun 2007
    Posts
    28

    Default

    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?

Similar Threads & Tags
Similar threads

  1. Suexec + file permissions
    By gersonfs in forum Security
    Replies: 3
    Last Post: 12-24-2010, 04:40 AM
  2. Suexec + file permissions
    By gersonfs in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-23-2010, 06:02 PM
  3. Will Perl/PHP scripts have problems if suexec and phpsuexec turned on?
    By SuperBaby in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 01-18-2008, 03:28 PM
  4. Anyone have problems with php suexec and image magik
    By DWHS.net in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-17-2004, 03:40 AM
  5. permissions for the counters [suexec?] (modedit)
    By hedgehog in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 03-11-2002, 11:47 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube