- Aug 14, 2001
- 12,343
- 0
- 0
i've been reading stuff about chrooting apache, and it seems that the consensus is basically that apache is not all that conducive to chroot. it needs to get at alot of things, and i plan on using mod_php4, mod_python and perhaps mod_perl and shell cgi, so i'm not sure if should do it at all. openbsd now does by default, and their docs have given me the most useful info (this is on netbsd, and most info i've found is for linux) - however their docs also pretty much state that if you want anything beyond simplicity, it might not be the best idea to chroot apache.
http://www.openbsd.org/faq/faq10.html#httpdchroot
and of you guys done this before?
and what about systrace? i recall it being stated that its *possible* to use systrace to let apache bind to port 80 as the httpd user, but is this actually being done yet? doesn't apache pretty much always expect to be started as root?
edit:
for example i see here that even the systrace people dont seem to be using systrace to let apache run as non-root, instead they just limit its access to other things. shouldnt you be able to do
native-bind: sockaddr eq "inet-[0.0.0.0]:80" then permit as root (and then run as regular user)
instead of just
native-bind: sockaddr eq "inet-[0.0.0.0]:80" then permit (and run as root)
?
http://www.openbsd.org/faq/faq10.html#httpdchroot
and of you guys done this before?
and what about systrace? i recall it being stated that its *possible* to use systrace to let apache bind to port 80 as the httpd user, but is this actually being done yet? doesn't apache pretty much always expect to be started as root?
edit:
for example i see here that even the systrace people dont seem to be using systrace to let apache run as non-root, instead they just limit its access to other things. shouldnt you be able to do
native-bind: sockaddr eq "inet-[0.0.0.0]:80" then permit as root (and then run as regular user)
instead of just
native-bind: sockaddr eq "inet-[0.0.0.0]:80" then permit (and run as root)
?