Squinky86 Retired Dev
Joined: 25 Mar 2003 Posts: 309 Location: Alabama, USA
|
Posted: Wed Feb 27, 2008 7:48 pm Post subject: apache running as root |
|
|
I have apache running (for the most part, default configuration, version 2.2.8-r1), but there are a couple aspects I don't understand. (note: using worker MPM and +threads).
First, when I look at the running processes on my system, I have 4 apache2 processes: Code: | # ps -A | grep apache2
23537 ? 00:00:00 apache2
23538 ? 00:00:00 apache2
23541 ? 00:00:00 apache2
23543 ? 00:00:00 apache2 | But when I look at the users of each process, I see the following: Code: | #top -p `ps -A | awk 'BEGIN { ORS = ","} /apache2/ { print $1 }'`0
(top shows the following):
23537 root 18 0 324m 12m 5940 S 0 0.6 0:00.05 apache2
23538 apache 22 0 223m 3984 692 S 0 0.2 0:00.00 apache2
23541 apache 18 0 738m 21m 9200 S 0 1.1 0:00.16 apache2
23543 apache 18 0 535m 12m 3352 S 0 0.6 0:00.00 apache2
24015 root 15 0 16996 1172 912 R 0 0.1 0:00.00 top | Why is the first process, pid #23537, running as root? Furthermore, looking at phpinfo(); on my server, the following looks very peculiar:
Code: | (under environment): USER = root
and under variables, _ENV["USER"] = root | Why are these variables not showing up as "apache"?
EDIT 1: remove useless grep (and move to awk statement) so that people don't flame me.
EDIT 2: remove useless tr (and move to awk statement) so that people don't flame me. _________________ Me |
|