|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
server to server using Net::FTP
I'm trying to copy a bunch files from a win2k server to a sun solaris server by running a perl script on a macosx box running perl 5.6.
If I use Net::FTP to do local transfers in my script, everything works fine... I can ftp from the mac to the sun box and from the mac to the win2k box. I'm hoping to use pasv_xfer(sourcefile, dest_server) to do a server to server passive transfer. But I can't find any examples of how to do this through books or googling. In the subroutine I have... [snip out subroutine header and reading in passed variable stuff] $datafile = shift(@_); $ftpout=Net::FTP->new($siteout); $ftpin=Net::FTP->new($sitein); [ snip - I log into both servers, switch to binary and then cwd to the source and destination directories ] $ftpout->pasv_xfer($datafile, $ftpin) or return "can't send\n"; ---- I get my "can't send" error code returned to me. So what's wrong? Do I need to explicitly set passive mode? What's really required for passv_xfer to work? I really don't want to ftp the file twice .... |
|
#2
|
||||
|
||||
|
Maybe the server can't be set as passive
Try evaluating pasv() to see if passive tranfer can be enabled on the server Regards Ax |
|
#3
|
|||
|
|||
|
I recall reading something...
I recall that we tried this some little while ago. Success or failure depended on the ftp server software on the two machines.
In the end it became so restrictive that we ended up using scp which always worked as long as it was installed (we found an older HP-UX box that didnt have it). ..fwiw |
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > server to server using Net::FTP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|