Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is Chrooting apache/mysql/php a standard practice of securing web servers containing sensitive data (is it necessary)?

share|improve this question
up vote 6 down vote accepted

No, chrooting isn't standard practice with Apache. I wouldn't consider it necessary either. However, chuser and chgroup are-- you shouldn't run Apache as root. Doing all three is common with BIND. You should default to running with least privileges necessary with all daemons and all cases.

It's arguable that chrooting is pointless in a lot of cases as well. Check out Abusing a chroot jail.

share|improve this answer
Very informative post, though it seems to desire as a premise the contained processes and users can chroot themselves\have root priveledges. Which from the comments I understand is avoidadble in a properly setup chroot.. – Joshua Enfield May 11 '10 at 17:06
I agree with your point. – Warner May 11 '10 at 17:17

Poor man's PHP environment chroot:

share|improve this answer
Welcome to Server Fault! Please read our faq in particular May I promote products or websites I am affiliated with here?. – EEAA Mar 6 '13 at 8:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.