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.

Httpd Runs as Nobody with SuExec Is Enabled

Discussion in 'General Discussion' started by offmask, Aug 3, 2012.

  1. offmask

    offmask Registered

    Joined:
    Aug 3, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,


    To get better performance for my site, I decided to use fcgid as PHP handler with SuExec, MPM worker and XCache. After reading documents, samples, discussions and blogs for several days, I finally get the basic things done. Well, it's not easy for a newbie :D

    But I found the httpd runs as Nobody.
    Here's part of the httpd.conf:

    Code:
    <VirtualHost >
        ServerName aaaa.com
        ServerAlias [url=http://www.aaaa.com]Aaaa.com[/url]
        DocumentRoot /home/aaaa/public_html
        ServerAdmin webmaster@aaaa
        UseCanonicalName Off
        CustomLog /usr/local/apache/domlogs/aaaa combined
        CustomLog /usr/local/apache/domlogs/aaaa-bytes_log "%{%s}t %I .\n%{%s}t %O ."
        ## User aaaa # Needed for Cpanel::ApacheConf
        ScriptAlias /cgi-bin/ /home/aaaa/public_html/cgi-bin/
    
        Include "/usr/local/apache/conf/userdata/std/2/aaaa/aaaa/*.conf"
    
        <IfModule !mod_disable_suexec.c>
            SuexecUserGroup aaaa aaaa
        </IfModule>
    </VirtualHost>
    And, of course, suEXEC is on
    Code:
    Default PHP Version (.php files)	5
    PHP 5 Handler	fcgi
    PHP 4 Handler	none
     	 
    Apache suEXEC	on
    
    I think the httpd should run as aaaa, right?
     
    #1 offmask, Aug 3, 2012
    Last edited: Aug 3, 2012
  2. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    387
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    its expected behavior..HTTP will still run as user "nobody"; but PHP should run as user...that is any HTTP "process" will run as user nobody and if that HTTP process needs to handle PHP pages the corresponding PHP process will run as the particular user.

    If you need to run apache processes as user, use mod_ruid2 ( it consume lot of memory though )
     
  3. offmask

    offmask Registered

    Joined:
    Aug 3, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks a lot! I didn't realize the phps are running as the user I specified.
     
Loading...

Share This Page