LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   installing apache in ~ of a normal user (http://www.linuxquestions.org/questions/linux-server-73/installing-apache-in-%7E-of-a-normal-user-858930/)

austinium 01-26-2011 11:35 PM

installing apache in ~ of a normal user
 
Hi,

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

thanks

xeleema 01-27-2011 01:20 AM

Greetingz!

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".
Example:
Code:

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
luser@lhost$

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 11:42 AM.