You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dragon <dr...@crimson-dragon.com> on 2007/07/25 17:12:28 UTC
Re: [users@httpd] How in the name of LINUX do u set apache2.2
to run as user www-data
Demetri T. wrote:
>thats already set by default when i installed apache(which is
>www-data). I think i am having an issue either with file/directory
>permissions and/or on how Apache is starting up; it just stays
>running as root instead switching over to www-data (the user/group
>set when installed).
>
>I am having a hard time finding the requirements for apache to run
>as another user, would you or anyone know. i have checked the apache
>docs to no avail, and still searching the net.
---------------- End original message. ---------------------
I am sure somebody will correct me if I am wrong but IIRC, invoking
httpd directly results in it continuing to run as the user that invoked it.
As stated in the manpage for httpd:
httpd is the Apache HyperText Transfer Protocol (HTTP) server
program. It is designed to be run as a standalone
daemon process. When used like this it will create a pool of
child processes or threads to handle requests.
In general, httpd should not be invoked directly, but rather
should be invoked via apachectl on Unix-based sys-
tems or as a service on Windows NT, 2000 and XP and as a
console application on Windows 9x and ME.
How are you starting Apache?
Are you using the startup script apachectl or are you starting it directly?
Most *nix type OS distributions also have a startup script that is
run at system boot to invoke httpd which generally does some house
keeping stuff and then invokes apachectl. You may have to use a
utility like checkcfg on Red Hat systems or your system's equivalent
to enable the startup on boot.
Dragon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] How in the name of LINUX do u set apache2.2
to run as user www-data
Posted by Dragon <dr...@crimson-dragon.com>.
Joshua Slive wrote:
>On 7/25/07, Dragon <dr...@crimson-dragon.com> wrote:
>
>>
>>I am sure somebody will correct me if I am wrong but IIRC, invoking
>>httpd directly results in it continuing to run as the user that invoked it.
>
>Consider yourself corrected ;-)
>
>httpd always switches users for child processes when started as root.
---------------- End original message. ---------------------
Hey, we learn something new every day. :-)
Thanks for the clarification.
Dragon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] How in the name of LINUX do u set apache2.2 to run as user www-data
Posted by Joshua Slive <jo...@slive.ca>.
On 7/25/07, Dragon <dr...@crimson-dragon.com> wrote:
>
> I am sure somebody will correct me if I am wrong but IIRC, invoking
> httpd directly results in it continuing to run as the user that invoked it.
Consider yourself corrected ;-)
httpd always switches users for child processes when started as root.
Joshua.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org