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
  


Determining shared libraries page 3 of 13


The first step in creating a chroot environment is to determine which shared system libraries the Web server requires. As noted in the Introduction, the examples provided in this tutorial are based on a default installation of Apache 1.3.26. If you're using another program, or customized installation directories, you will need to modify the commands to reflect your particular configuration.

Use the ldd command to list the library dependencies for a given program. At a console, as root, type:


[root@thor bin]# ldd /usr/local/apache/bin/httpd
        libm.so.6 => /lib/i686/libm.so.6 (0x40027000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004a000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x40077000)
        libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Substitute the path to your httpd binary as necessary. Write down the information provided for future reference, or simply redirect the output to a text file (ldd /usr/local/apache/bin/httpd > /root/apache_shared).


Main menuSection menuFeedbackPreviousNext
Privacy Legal Contact