-   Linux - Security (
-   -   Chrooted Apache (

dominant 09-19-2004 08:43 AM

Chrooted Apache
Why should someone run a chrooted Apache and not a simple apache?

chort 09-19-2004 10:05 PM

Because one of the few services on Linux open to random connections is Apache and there are many Apache modules, particularly mod_php that have abysmal security records. If you run Apache chrooted and it gets compromised, the attacker cannot do anything outside the chroot. This means that they can possibly mess with your website, but not do any damage to the rest of your system.

Note that for this to work correct, Apache cannot be run as root, it must be run as some unprivileged user. Also, none of the files in the chroot area should be writable by this user that's running Apache, that way an attacker who manages to exploit Apache hopefully won't even be able to modify your website files! This is a very nice degree of security, certainly much, much better than running Apache as root and letting it access the entire system.

dominant 09-20-2004 01:38 AM

Yeah, but what if apapache is used for the mod_dav module.

There the directories must be writable by the apache user.

chort 09-20-2004 02:43 AM

Well, that's a concious decision and those directories would be subject to damage if Apache is ever compromised. Better keep up to date with security patches!

dominant 09-20-2004 02:48 AM

Yeap, that's a common practice :)

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