View previous topic :: View next topic |
Author |
Message |
Jerry Gardner n00b
Joined: 04 Apr 2003 Posts: 62
|
Posted: Fri Apr 04, 2003 10:36 pm Post subject: Apache User ID? |
|
|
I just installed Apache 1.3.27 on my system. My Apache config files have the line
User apache
in them, and the documentation says that this is the user ID that Apache will run under, but it always seems to run as root. What I'm I doing wrong?
Also, based on the config files, I was expecting to see 4-5 apache processes running, but I only see one ('apache', rather than 'httpd' as the documentation states). Anyone know why this is? |
|
Back to top |
|
|
474 l33t
Joined: 19 Apr 2002 Posts: 714
|
Posted: Sat Apr 05, 2003 4:34 pm Post subject: |
|
|
Quote: | the documentation says that this is the user ID that Apache will run under, but it always seems to run as root. What I'm I doing wrong? |
Nothing, in all likelihood. I believe that apache starts a "stub" as root, and then forks as necessary to handle actual requests. On my server, these forked processes clearly belong to the apache user. Try requesting some pages from your server (from different clients if possible), then use the ps command to analyse this further. Example from my server: Code: | # ps -U root | grep apache
1296 ? 00:00:00 apache
# ps -U apache
PID TTY TIME CMD
20974 ? 00:00:12 apache
28151 ? 00:00:32 apache
23092 ? 00:00:28 apache
22080 ? 00:00:08 apache
32041 ? 00:00:12 apache
8052 ? 00:00:09 apache |
|
|
Back to top |
|
|
caffiend n00b
Joined: 26 Mar 2003 Posts: 48 Location: Oakland, CA
|
Posted: Sat Apr 05, 2003 4:39 pm Post subject: |
|
|
just to clarify, Apache needs to start as root to bind to port 80.
As kerframil said, the subprocesses that are spun off to handle requests are using the apache user. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|