erlang ftpd server

David N. Welton <>
Thu May 27 11:17:23 CEST 2004


Hi all,

I needed an ftpd server for the work I'm doing, so I took the one at:

http://www.erlang.org/examples/klacke_examples/

and tried it.  Unfortunately, it's not really that usable as shipped.

I'm attaching an updated version.

Changes include:

*) Don't send '200' after certain operations, such as LIST.  The 226 it 
sends is enough.

*) Change the default 'ls' date format to conform to other ftpd daemons. 
  This was necessary so that browsers like Mozilla would recognize the 
output.

*) Fix up r-wr-x... permission display.

*) Added rel_path([], []) to deal with 'empty' paths.

*) Changed 'lst' to 'list' in dir_list to make it work correctly.

*) Added a start function that doesn't take arguments, so as to be able 
to start the server from the command line easily.  *Warning* - uses / as 
its default directory!

Now, the caveat: I'm new to erlang programming, and am not well versed 
in the FTP protocol, so my work may not be perfect.  However - it works.

Thankyou,
-- 
David N. Welton

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ftpd.erl
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20040527/f64c8fbb/attachment.ksh>


More information about the erlang-questions mailing list