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
  


Transfering configuration and content page 6 of 13


The next step is to stop the Apache server (if it is running) and transfer any existing configuration files, the contents of the cgi-bin directory, the DocumentRoot, and the httpd binary to the chroot directory structure. The commands used here will, of course, vary based on your chroot directory structure and the location of your existing Web server files. If your previous installation resided under /home/httpd, and the httpd program binary was located in the /usr/sbin directory, the procedure would be:


[root@thor root ]# cp -r /etc/httpd /chroot/httpd/etc/
[root@thor root ]# cp -r /home/httpd/cgi-bin /chroot/httpd/www/
[root@thor root ]# cp -r /home/httpd/www /chroot/httpd/www/
[root@thor root ]# mknod /chroot/httpd/dev/null c 1 3
[root@thor root ]# chmod 666 /chroot/httpd/dev/null
[root@thor root ]# cp /usr/sbin/httpd /chroot/httpd/usr/sbin/

Main menuSection menuFeedbackPreviousNext
Privacy Legal Contact