Subject: directory listing problems - PLEASE help

From: "Stefan Berg" <[email-masked]>
Date: Tue, 22 Oct 1996 15:25:31 +0100

Hi,

this may be a common problem/error, but I just cannot find the
solution in any FAQ. Please help me out here..

I have set up wu-ftpd 2.4 for my Solaris 2.5 machine without trouble.

Everything but one thing works:

When clients log into my ftp-archive, and they have their own
"change-root" areas to work within, they cannot list the
contents of the directory. It works fine with just typing
"ls" when logged through a terminal window, but it does
not work when I use the "quote LIST" command. Return is:
"425 Can't build data connection: Connection refused."

I have set up the directory as advised in the Solaris man page for
ftpd, and also checked a few different FAQ:s.

The common advise for this problem is to make sure that the users
shell is listed in the /etc/shells file.
Now, I didn't use to have an /etc/shells file, but now I have added
one, with one single line in it:

-------------start file
/bin/ksh
-------------end of file

This shell (/bin/ksh) is the only shell I use, and is also the shell
the user in question is using. Now, I've even copied the system
version of ksh to the users /bin -directory, and still no success.

PLEASE help me here!

/Stefan

---

From: [email-masked] (Koos van den Hout _U nix and we all_)
Date: Tue, 22 Oct 1996 16:21:27 +0200 (MET DST)

Quoting Stefan Berg, who wrote :

> "change-root" areas to work within,

Do these chroot areas have their own copies of all needed libraries, and,
very important for Solaris, the correct devices ?

Each chroot area needs to have it's own complete setup like the anonymous
ftp area.

                                                  Grtx KH

-- 
  Koos van den Hout,     Internetter, Unix freak, ISFJ and BBS SysOp at large
  [email-masked] (Home)        BBS Koos z'n Doos (+31-30-6036637 28k8)
  [email-masked] (Work)  <-- finger -l for PGPkey    (+31-30-6056619 14k4)
  http://www.hvu.nl/~koos (WWW)    Looking for a license plate with "RFC 822"
  Unix op z'n NL's : Segment overtreding - kern uitgescheten       KH106-RIPE

---

From: Lindsay Haisley <[email-masked]>
Date: Tue, 22 Oct 1996 11:37:23 -0500 (CDT)

"Thus spake Stefan Berg"
> "425 Can't build data connection: Connection refused."

When wu-ftpd interacts with a client, it does a chroot to whatever base
directory is appropriate for the login.  Any files which wu-ftpd needs to
access must reside further up on this directory branch.  Not only is this
true, but any files which are needed by any processes run by wu-ftpd must
also be similarly accessable - including shared libraries.  A common mistake
in setting up ftp access is to place a dynamically linked copy of ls in the
bin directory of each guest area.  Because said ls can't access it's dynamic
lib, it won't run.  All copies of ls available in guest login areas must by
statically linked, as must be any other utilities available for anonymous or
guest ftp.  A symbolic link to another statically linked ls won't work since
the directory structure has been altered for the session.  A hard link
>will< work, as long as the linked-to file is on the same filesystem.

-- 
Lindsay Haisley          | "Everything works     |   PGP public key
FMP Computer Services    |       if you let it"  |   available via
[email-masked]           |    (The Roadie)       |   Internet finger
http://www.fmp.com       |                       |