Skip to main content
IBM  
Shop Support Downloads
IBM Home Products Consulting Industries News About IBM
IBM developerWorks : Security : Education - Tutorials
Securing your Web server
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
4. Jailing your Web users
  


Creating the required chroot directories page 5 of 13


Now create the required chroot directory structure. The location of this structure can theoretically be anywhere in the filesystem (ideally, for security and maintenance it should reside on a separate partition). For the purposes of this tutorial, I'll use /chroot/httpd as the basis for the chroot environment and /chroot/httpd/www as the server DocumentRoot. The structure created below is an example only; modify the directory names and locations to suit your own personal preferences.


[root@thor root ]# mkdir /chroot/httpd
[root@thor root ]# mkdir /chroot/httpd/dev
[root@thor root ]# mkdir /chroot/httpd/lib
[root@thor root ]# mkdir /chroot/httpd/etc
[root@thor root ]# mkdir -p /chroot/httpd/usr/sbin
[root@thor root ]# mkdir -p /chroot/httpd/var/run
[root@thor root ]# mkdir -p /chroot/httpd/var/log/httpd
[root@thor root ]# chmod 750 /chroot/httpd/var/log/httpd/
[root@thor root ]# mkdir -p /chroot/httpd/www

Main menuSection menuFeedbackPreviousNext
Privacy Legal Contact