On Tue, 2006-05-30 at 15:34 -0700, prad wrote:
> i tried to got a ksh script to work after i copied the ksh into /var/www/bin
> my understanding is that the chrooted environment doesn't give access to 
> the /bin/ksh program.

/var/www/bin/sh is working for me.

> i tried the same thing with ruby (copied both ruby and erb into /var/www/bin) 
> and got the same thing again.

Ruby is working for me too. Check this out:

#!/bin/sh
WWW="/var/www"
# Path
[ ! -d "$WWW/bin" ]             && mkdir -p $WWW/bin
[ ! -d "$WWW/usr/bin" ]         && mkdir -p $WWW/usr/bin
[ ! -d "$WWW/usr/local/bin" ]   && mkdir -p $WWW/usr/local/bin
[ ! -d "$WWW/usr/local/sbin" ]  && mkdir -p $WWW/usr/local/sbin
[ ! -d "$WWW/usr/local/lib" ]   && mkdir -p $WWW/usr/local/lib
[ ! -d "$WWW/usr/lib" ]         && mkdir -p $WWW/usr/lib
[ ! -d "$WWW/var/run" ]         && mkdir -p $WWW/var/run
# cp ruby
RUBY=$(which ruby)
cp -f $RUBY $WWW/$RUBY
# cp env
ENV=$(which env)
cp -f $ENV $WWW/$ENV
# Ruby stuff
rsync -va /usr/local/lib/ruby $WWW/usr/local/lib
# cp libs
for LIB in $(ldd $RUBY | awk '{if ($3 == "rlib") {print $7}}'); do
    cp -f $LIB $WWW/$LIB
done
# cp hints
cp -f /var/run/ld.so.hints $WWW/var/run/ld.so.hints


I have got one more script that fixes ImageMagick which is needed by
Typo3.

Bye,
        Aiko

-- 
Aiko Barz <[EMAIL PROTECTED]>
Web: http://www.haeckser.de

Reply via email to