in reply to chroot a directory...

Note that you try to chroot twice:

chroot('/var/www/html') or die " chroot() a échoué : $!\n";
and
chroot($docroot) or die " chroot() a échoué : $!\n";

This probably is not what you want. Also, be careful about chroot. You may want to add a chdir as well. From the documentation:

(It doesn't change your current working directory, which is unaffected.)

Lastly, chroot changes root. You should not try to open $docroot$file, just $file.


If anyone needs me I'll be in the Angry Dome.

Replies are listed 'Best First'.
Re^2: chroot a directory...
by Anonymous Monk on Sep 09, 2004 at 21:32 UTC
    "Lastly, chroot changes root. You should not try to open $docroot$file, just $file."

    That's it !! As looking for $docroot in the chrooted env. the page was not displayed. Thanks a lot for your aswers,without i think i had spent a lot of time to find the solution.