Chrooting Squid, Apache and Perl

Is fairly straight forward.
You will need to be able to use the following commands with some confidence
Tips. When copying files make sure your umask is set to 022 and alias cp as follows:
alias cp=”cp -p”
If you are copying over any perl XS files ie *.so files make sure you also use ldd on these. As an example the PostgreSQL drivers require:
ldd usr/lib/perl5/auto/DBD/Pg/ => /usr/lib/ (0xb7fbf000) => /lib/tls/ (0xb7e89000) => /usr/lib/i686/cmov/ (0xb7e58000) => /usr/lib/i686/cmov/ (0xb7d59000) => /usr/lib/ (0xb7cf1000) => /lib/tls/ (0xb7cc4000) => /lib/tls/ (0xb7cb2000) => /lib/tls/ (0xb7c9d000) => /lib/tls/ (0xb7c8e000)
/lib/ => /lib/ (0x80000000) => /lib/tls/ (0xb7c8b000) => /usr/lib/ (0xb7c68000) => /lib/ (0xb7c65000)
A quick way to find your shared object files is as follows.
find /chroot_directory_name/usr/ | grep perl | grep “.*\.so$”
You will already have copied most of the shared object files over while copying squid and apache but there are most likely a few extra ones you are going to need in particular if you are using the DBI.