Httpd Runs as Nobody with SuExec Is Enabled

offmask

Registered
Aug 3, 2012
2
0
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.
7519 nobody 19 0 1164m 14m 3428 S 0.0 0.7 0:01.09 httpd
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 [email protected]
    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?
 
Last edited:

NixTree

Well-Known Member
Aug 19, 2010
413
5
143
Gods Own Country
cPanel Access Level
Root Administrator
Twitter
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 [email protected]
    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?
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 )