Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Can somebody suggest a small one-.c-file ftpd server, so I can run it on any port and it would accept ftp upload with any l/p on that port and put a file into a folder where it runs?

No config files and so on, just a mere command line options.

PS Would be good if the code is not from 90x.

share|improve this question
    
Does it have to be FTP, or are you just trying to accept files from anywhere? Asking because it might affect the answer - also how much support do you need for different users. –  EightBitTony Aug 9 '11 at 16:50
add comment

1 Answer 1

Based on your comment, I would use netcat and not bother with FTP at all (assuming you can't use scp).

Source server,

cat myfile | nc -q 10 -l -p <someport>

Target server,

nc sourceserver someport > targetfile

If you still think you need an FTP server (and your question still doesn't say why it must support FTP), then you can look through the ones on this list,

Wikipedia List of FTP Server Software

To be honest, not sure how you handle running it on non-standard ports, FTP uses two ports (21 and 22), one for data and one for commands. You can alter the behaviour using passive FTP, but I've never tried to set up an FTP server outside of the typical ports (because FTP is generally insecure).

I think you need to look at scp (not sure why you can't use it, you don't stipulate).

share|improve this answer
2  
Not sure why it's less reliable than FTP, anyway, you might want to update your question to include the size of the files, frequency, etc. –  EightBitTony Aug 9 '11 at 17:44
2  
@user9456 it's actually extremely reliable for large files. –  bahamat Aug 9 '11 at 19:39
    
You may even want to hack together an xinetd setup for the netcat... –  Aaron D. Marasco Aug 10 '11 at 0:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.