WU-FTPD Anonymous FTP Configuration Problem

I had this problem, and couldn't find any advice or solutions anywhere until I finally figured it out myself, so I'm publishing this here in hopes others who have this problem can find it. I solved the problem 20-July-1996, had the problem for several weeks before that.

I installed wu-ftpd (2.4(6)), configured it, and tested it pretty well, both anonymously and as real users. Everything looked good to me, so I turned it loose, only to discover that some anonymous users couldn't list the files on the server. They could download the files if they knew the exact path, and they could upload files.

I tracked this down to which client they were using. The Windows 95 client could list the files, as could the SunOS 4.1.3 client. The client on the Linux boxes I tried (no idea what it is) couldn't. Mosaic and Netscape couldn't.

I then enabled debug logging in ftpd, and looked at a session the succeeded and one that failed. They were using different commands -- one used LIST, the other NLST. I started to suspect that the problem was in executing the ls command.

Analysis

Anonymous ftp users are run in a chrooted environment. Thus, they do not have access to any part of the directory tree above their root point (which is normally ~ftp). The wu-ftpd installation instructions tell you about putting a copy of ls in ~ftp/bin, and setting the proper protections. I'd done this, and it didn't work. I checked the protections, and played around a bit.

On Linux, ls is normally a dynamically linked executable. I soon suspected that the problem was that the dynamic linker and libraries weren't available in the chrooted environment. I started trying to put the necessary pieces into place (ld-linux.so, config files, libraries), but never quite got it all working. I did, however, cause enough change in behavior to know I was on the right track.

Solution

So I built a statically linked version of ls. It's 303k instead of 27k, but it works. (The loader and library are bigger than 300k by a lot, so I don't lose on space yet. If/when I build static versions of tar and gzip, then I'll lose on space.)

Building a statically linked version of a program is easy using gcc. Run the normal build procedure, find the line that does the actual link, and re-run that command with the addition of the --static option.

Postmortem

Read step 4 of INSTALL more carefully; it exactly describes this situation and the two possible fixes, although it mentions only SunOS, not Linux.

WU-FTPD Mailing List

The mailing list seems to have disappeared. listserv@wunet.wustl.edu seems to know nothing about it. The host listed for Bryan D. O'Connor bryan@fegmania.wustl.edu is no longer in the DNS. The list of publicly accessible mailing lists does not list it.

Anybody know about any relevant mailing lists?


David Dyer-Bennet <dd-b@dd-b.net>
Last modified: Mon Jul 26 10:44:23 CDT 1999