Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache User ID?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Jerry Gardner
n00b
n00b


Joined: 04 Apr 2003
Posts: 62

PostPosted: Fri Apr 04, 2003 10:36 pm    Post subject: Apache User ID? Reply with quote

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
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Sat Apr 05, 2003 4:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
caffiend
n00b
n00b


Joined: 26 Mar 2003
Posts: 48
Location: Oakland, CA

PostPosted: Sat Apr 05, 2003 4:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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