Reputation: 29
I cannot cd to the path on remote machine in FTP mode. Please advise.
if (! $sftp->cwd($tgt)) {
$error = $sftp->error;
#print ("Unable to cd to $tgt: $error\n");
print ("$error\n");
logmsg("Unable to cd to $tgt: $error\n");
mailmsg("Unable to cd to $tgt: $error\n");
myExit();
} else {
print ("Able to cd to $tgt: \n");
logmsg("Able to cd to $tgt: \n");
}
The error I get is 0 only. I checked online, 0 means syntax error but I personally don't think so.
Upvotes: 1
Views: 157