#!/usr/bin/perl
#####################
#ftp chroot install
#####################
print "Enter user directory: ";
$userdir=;
print "\n";
chomp($userdir);
print "Enter username: ";
$username=;
chomp($username);
print "\n";
print "Making Directory $userdir/lib\n";
qx|cd $userdir \
mkdir lib \
chmod 111 lib \
cd lib \
cp /lib/ld-2.2.4.so ./ \
cp /lib/libc-2.2.4.so ./ \
cp /lib/libtermcap.so.2.0.8 ./ \
chmod 555 ld-2.2.4.so libc-2.2.4.so libtermcap.so.2.0.8 \
ln -s ./ld-2.2.4.so ./ld-linux.so.2 \
ln -s ./libc-2.2.4.so ./libc.so.6 \
ln -s ./libtermcap.so.2.0.8 ./libtermcap.so.2|;
print "Making Directory $userdir/bin\n";
qx|cd $userdir \
mkdir bin \
chmod 111 bin \
cd bin \
cp /bin/ls ./ \
chmod 555 ls|;
print "FTP addition completed\n";
|