[Tutor] using ftplib

John Fabiani jfabiani at yolo.com
Thu Jun 10 21:48:00 EDT 2004


Chad Crabtree wrote:

>>The link explain something regarding a return port. 
>>So how does one 
>>setup the return port???
>>John
>>    
>>
>
>the impression I got from the board thread is that
>there's possibly a bug in the ftpserver.
>
>
>
>	
>		
>__________________________________
>Do you Yahoo!?
>Friends.  Fun.  Try the all-new Yahoo! Messenger.
>http://messenger.yahoo.com/ 
>
>
>  
>
I have discovered more.  I'm now able to send data to a windows FTP 
server.  I found a great infomation site on FTP at "slacksite.com".  
They have a white paper on the differences between Active vs Passive 
FTP.  And another site is www.dreamhaven.org/ftp-raw.html.

To get the transfer to work I added the following
remote.sendcmd('PASV')
remote.set_pasv(0)

The first sets the mode to passive at the server.  And then I think the 
second sets the passive off.  I know they are the appear to be opposites 
but it works and does not without the statments.  Now I'm sure all of my 
issues have thing to do with active vs passive FTP.  Now I need to 
understand how the 'PORT ' command work from within python ftplib.

John



More information about the Tutor mailing list