MrCBofBCinTX
Technical User
I wrote a script to move ImageMagick module into chroot, worked fine except that refused to copy any of the *.h files. Why not?
Directory and file permissions allow it and I ran script as root.
Directory and file permissions allow it and I ran script as root.
Code:
#!/usr/bin/perl
use warnings;
#use strict;
use diagnostics;
#Image Magick file copier to suexec_chroot
use File::Copy;
use lib qw(/var/[URL unfurl="true"]www/htdocs/users/visionsbykarl.com/cgi/);[/URL]
my @files;
my $sourcefile;
print "Content-type: text/plain \n\n"; #The header
open(IN,"<ImageMagickfiles") || print ("could not open");
while (<IN>) {
my $filetobecopied=$_;
chomp $filetobecopied;
my $newfile = "/var/[URL unfurl="true"]www$filetobecopied";[/URL]
print "$filetobecopied\n";
print $newfile ."\n";
copy($filetobecopied, $newfile) or warn "File really cannot be copied.";
print "file copied: $filetobecopied --> $newfile \n\n";
}
close(IN);
print "OK";