1 |
On 05/22/2013 05:01 PM, Jarry wrote: |
2 |
> Hi Gentoo community, |
3 |
> |
4 |
> I modified apache config to have it running on non-private |
5 |
> port 8080. I restarted apache and verified that it is |
6 |
> really listening on port 8080 (netstat). But when I check |
7 |
> all running apache processes for owners, I see there is still |
8 |
> one apache process running as root (rest are running as |
9 |
> "apache" user). |
10 |
> |
11 |
> So my question is: how can I run apache completely as non-root |
12 |
> user? IIRC, "root" is necessary only if I want to use "low" |
13 |
> port numbers (0-1023), but my apache is using 8080... |
14 |
> |
15 |
|
16 |
That's the parent process; it doesn't actually handle any requests, it |
17 |
just hands them off to a child process running as another user/group. |
18 |
|
19 |
Apache needs to be root to both (a) bind to ports < 1024, and (b) switch |
20 |
to the user/group specified in httpd.conf. If you don't need to do |
21 |
either of those, try starting apache as the user you want it to run as. |
22 |
|
23 |
You'll probably need to write your own init scripts, since the stock |
24 |
ones assume that you're root. |