Home: Perl Programming Help: Intermediate:
Net::FTP chmod not working on solaris 11



turnerr
Novice

Sep 11, 2014, 8:50 AM


Views: 5356
Net::FTP chmod not working on solaris 11

I have a script that uses Net::FTP to ftp files between servers and it also performs a chmod on the files so they will have the correct permissions. We recently upgraded one of our servers to solaris 11 and the chmod no longer works on that server. It appears that the return code is a '5' when the chmod fails. The script also does not recognize that the chmod is not working for some reason. I'm running perl 5.12.5. Has anyone encountered this and come up with a solution? Here's the code snippet of the chmod:

$ftp->site("chmod 744 $filename") or $err=1;
if ($err) {
push @ERRORS, "Cannot chmod file $!\n";
myerr() if $err;
$ftp->quit;
return 1;
}


Thanks,
Rob