PDA

View Full Version : Trouble changing directories


darknite87
01-15-2004, 05:17 PM
have Perl installed on a windows server and I cannot change directories from the script itself, but when I "cd" to the directory on the command line it works. The permissions are set correctly to 755.Here is the code snippet:

#!C:\Perl\bin\perl.exe
use File::Copy;

#The following are the subroutines

sub change_path {
chdir ($location);
return $location;
print "$location";
}

sub copy_files {
copy ($file, $location);
}

#Get the arguements and define them

@_ = $ARGV[0];
$file = $ARGV[0];
$file = s/C:\\Apache\\htdocs\\atm_dev\\suites\\//;
$location = "Z:\\system_test\\IT\\E_Business\\Projects\\iDEN_Up date_CFM\\ATM\\";

#Establish the clearcase commands to run on the command line

$coDirectory = "cleartool co -nc \.";
$mkElement = "cleartool mkelem -nc $file";
$ciDirectory = "cleartool ci -nc \.";
$ciFile = "cleartool ci -nc $file";

&change_path;
&copy_files;

dswimboy
01-16-2004, 02:37 PM
i have attempted copying log files using perl on IIS. since the script works correctly at a command prompt, i am thinking that IIS is disallowing access to files outside of the webserver. so all files that aren't directly accessible via your webserver, aren't indirectly accessible either. if the files were accessible, there would be a security vulnerability.