FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 14th, 2003, 05:53 PM
drossmit drossmit is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 1 drossmit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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 ....

Reply With Quote
  #2  
Old May 15th, 2003, 03:40 AM
Axweildr's Avatar
Axweildr Axweildr is offline
CPAN medic ...
Dev Shed God 13th Plane (11000 - 11499 posts)
 
Join Date: Mar 2003
Location: Location: Location:
Posts: 11,406 Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)Axweildr User rank is General 27th Grade (Above 100000 Reputation Level)  Folding Points: 124792 Folding Title: Super Ultimate Folder - Level 1Folding Points: 124792 Folding Title: Super Ultimate Folder - Level 1Folding Points: 124792 Folding Title: Super Ultimate Folder - Level 1Folding Points: 124792 Folding Title: Super Ultimate Folder - Level 1Folding Points: 124792 Folding Title: Super Ultimate Folder - Level 1Folding Points: 124792 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Months 2 Days 3 h 38 sec
Reputation Power: 2794
Send a message via Google Talk to Axweildr
Orkut
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

Reply With Quote
  #3  
Old May 15th, 2003, 09:22 PM
flooby flooby is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 flooby User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > server to server using Net::FTP


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT