FTP server code in passive mode
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > FTP server code in passive mode




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    FTP server code in passive mode  
ssantamariagarcia@hotmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-19-05 11:02 PM



I have programmed a FTP server in active mode but it falls on the
client side. The error message is "Connection refused" that appears
when server is trying to  connect back to the client's specified data
port from its local data port. I have told that I need to change the
code in order to get a server program that is able to manage connection
in a passive mode.

I wonder if any of you know the necessary changes in the code to get a
pasive mode FTP server,or maybe, where to find programming information
in C language about it.




Thanking you in advance,

Sonia Santamar=EDa.

(Sorry about my English.....)






[ Post a follow-up to this message ]



    Re: FTP server code in passive mode  
Ulrich Hobelmann


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-19-05 11:02 PM

ssantamariagarcia@hotmail.com wrote:
> I wonder if any of you know the necessary changes in the code to get a
> pasive mode FTP server,or maybe, where to find programming information
> in C language about it.

You need to implement the PASV and EPSV commands.  Basically you need to
open a listening socket on your server (on whatever port you like) and
send the client a response indicating your ip and port (for PASV) or
just the port number (for EPSV).  The client should then connect to your
socket and issue a command (data transfer, LIST, NLST) and you
send/receive data.

Take a look at how existing clients and servers do it.

--
My mouth says the words, my brain is thinking monstertrucks.
Joey (Friends)





[ Post a follow-up to this message ]



    Re: FTP server code in passive mode  
ssantamariagarcia@hotmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
09-20-05 07:49 AM



>
> Take a look at how existing clients and servers do it.
>
> --
> My mouth says the words, my brain is thinking monstertrucks.
> Joey (Friends)


Thanks a lot Ulrich. I have already trying to implement the PASV
command (little mess...). I will tell you how I am doing .

Thanks again,
Sonia






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:16 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register