This article is from the Frequently Asked Questions for Linux, the Free/Open Source UNIX-like operating system kernel that runs on many modern computer systems. Maintained by David C. Merrill with numerous contributions by others. (v1.0).
A: FTP transfers that die suddenly are due, apparently, to some form of overrunning buffer. It occurs both with Linux and Microsoft servers. On Linux systems, the problem seems to occur most commonly with the distribution's server software.
If you receive ftp: connection refused errors, then the problem is likely due to a lack of authentication. Refer to Why Won't My FTP or Telnet Server Allow Logins?.
One remedy is to be replacing the distribution FTP server with the Linux port of the OpenBSD FTP server. The home page is: http://www.eleves.ens.fr:8080/ home/madore/programs/.
To install the BSD server, follow the installation instructions, and refer to the manual pages for inetd and inetd.conf. (If you have the newer xinetd, see below.) Be sure to tell inetd to run the BSD daemon alone, not as a subprocess of, for example, tcpd. Comment out the line that begins ftp in the /etc/inetd.conf file and replace it with a line similar to (if you install the new ftpd in /usr/local/sbin/): # Original entry, commented out. #ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.ftpd # Replacement entry: ftp stream tcp nowait root /usr/local/sbin/ftpd -l
The replacement daemon will become effective after rebooting or sending (as root) a SIGHUP to inetd, e.g.:
# kill -HUP inetd
To configure xinetd, create an entry in /etc/xinetd.d per the instructions in the xinetd.conf manual page. Make sure, again, that the command-line arguments for ftpd are correct, and that you have installed the /etc/ftpusers and /etc/pam.d/ftp files. Then restart xinetd with the command: /etc/rc.d/ init.d/xinetd restart. The command should report "OK," and the restart will be noted in the system message log.