oreilly.comSafari Books Online.Conferences.

Apache FAQ
Linux FAQ

Log in to particpate

   Linux FAQ > 10. Frequently Encountered Error Messages
Question:  10.25. FTP server says: ``421 service not available, remote server has closed connection.''

If an FTP server won't allow logins, it is probably configured correctly, but the problem is probably with authorizing users at login. FTP servers in current distriubtions often authorize users with the Pluggable Authentication Modules library, in which case there should be an authorization file /etc/pam.d/ftp. A generic authorization file looks like this. (The line break on the first "auth" line is for readability. The entry is actually a single, long line).

   auth       required  /lib/security/ item=user \
          sense=deny file=/etc/ftpusers onerr=succeed
   auth       required  /lib/security/ shadow nullok
   auth       required  /lib/security/
   account    required  /lib/security/
   session    required  /lib/security/

Also, make sure the /etc/ftpusers file, or whatever users file is named in the first "auth" line, is configured correctly.

Btw, the sample ftp file above is actually theftpd/ftp.pam.sample file from the ftpd-BSD-0.3.1.tar.gz package. Many thanks to David A. Madore for this much needed port.

This FAQ is from Linux Frequently Asked Questions with Answers, maintained by Robert Kiesling

Sponsored by: