-   Linux - Server (
-   -   installing apache in ~ of a normal user (

austinium 01-27-2011 12:35 AM

installing apache in ~ of a normal user

I am building apache2.2 from source, would installing in /home/USER_NAME, be a bad idea?


xeleema 01-27-2011 02:20 AM


Although that wouldn't be "bad" per se, as UNIX can be quite flexible, there's a few things you'll want to keep in mind;

1) In order to run a webserver on a port under 1024, the user in question is going to need some extra rights.
Typically this is handled by a startup script (in /etc/init.d or /etc/rc.d), which calls httpd as root, then spawns child-processes using a different account. This is called "Privledge separation".

luser@lhost$ ps -ef | grep httpd
apache  16333 31600  0 Jan26 ?        00:00:22 /usr/sbin/httpd
apache  16334 31600  0 Jan26 ?        00:00:21 /usr/sbin/httpd
apache  16458 31600  0 Jan26 ?        00:00:19 /usr/sbin/httpd
root    31600    1  0 Jan20 ?        00:00:01 /usr/sbin/httpd

2) Most SysAdmin's (that I know) would cut a small filesystem for their new application. This keeps it separated, and has the benefit of stopping an application from "flooding" a critical filesystem (some would argue whether or not /home is critical...).

3) If this is going to be any type of "standard" for your systems (rather than just a one-shot experiment), then you may want to avoid just dropping things into a user's home directory.

All times are GMT -5. The time now is 04:22 PM.