Subject: Re: "ls" works but "dir" does not from a ftp client

From: "ANM Mlist 01" <[email-masked]>
Date: 16 Nov 1998 01:17:54 -0000

At 03:47 PM 11/15/98 -0500, Gregory A Lundberg wrote:
>On 15 Nov 1998, ANM Mlist 01 wrote:
>
>> So I take it the "/bin/ls" in the chroot'ed fs work just peachy. Well
>> when I try as an anon login from a client, an "ls" returns:
>> 
>> ftp> ls
>> 200 PORT command successful.
>> 150 Opening ASCII mode data connection for file list.
>> pub
>> bin
>> etc
>> lib
>> incoming
>> 226 Transfer complete.
>> 30 bytes received in 0.11 seconds (0.27 Kbytes/sec)
>
>This is the built-in lister (LIST).  It always works; the question is it
>'ls' or 'dir' in the client.
>
>> ftp> dir
>> 200 PORT command successful.
>> 150 Opening ASCII mode data connection for /bin/ls.
>> 226 Transfer complete.
>> 
>> So what gives? 
>
>This is the external lister (~ftp/bin/ls) (NLST).  If it's not working
>you're not set up correctly.  The chroot test is a good starting point
>since it tells you things are there.  Check permissions.  Check the FAQ.
>

I realize that ~ftp/bin/ls is "NLST" that the client is calling. To
reiterate: I have checked the FAQ and the configurations: Again my
chroot test demonstrates that ~ftp/bin/ls does appear to work when
called stand-alone. I have triple checked the permissions as the test
below will show:

benny:ftp# (cd ~ftp; chroot . /bin/ls -l . /bin)
.:
total 5
d--x--x--x   2 root     root         1024 Sep 21 05:30 bin
dr-xr-xr-x   2 root     root         1024 Nov 15 19:19 etc
drwx-wx-wt   2 root     daemon       1024 Nov 15 18:28 incoming
dr-xr-xr-x   2 root     root         1024 Nov 15 18:49 lib
drwxr-xr-x   2 root     root         1024 Nov 15 18:29 pub

/bin:
total 189
---x--x--x   1 root     root       116244 Sep 21 05:03 gtar
---x--x--x   1 root     root        45309 Sep 21 05:03 gzip
---x--x--x   1 root     root        27212 Sep 19 00:06 ls
lrwxrwxrwx   1 root     root            4 Sep 21 05:30 tar -> gtar
benny:ftp# 

So where is the configuration error? Why can't I get client "NLST" to
work correctly.

>
>The location of the latest version of wu-ftpd can be found in the 
>directory
> 
>      ftp://ftp.academ.com/pub/wu-ftpd/private/
> 

I checked the URL got following response: 

ftp> open ftp.academ.com
Connected to ANNOUNCER.ACADEM.COM.
Connection closed by remote host.
ftp>

So thats not very helpful.

Thanks,

Anthony

---

From: Gregory A Lundberg <[email-masked]>
Date: Mon, 16 Nov 1998 10:18:36 -0500 (EST)

> So where is the configuration error? Why can't I get client "NLST" to

A few comments about this:

 - There's no ~ftp/dev directory so, depending on your flavor of Unix,
   that's probably the problem.  This is covered in the FAQ.

 - The /bin you've listed here looks to be the root /bin .. what are the
   contents of ~ftp/bin?

 - chroot tells you *root* can run the program, with all the special
   privileges, it doesn't say it's all there for a normal user like ftp.

 - ISTM you're running a Sun system, in which case you did NOT read the
   FAQ.  Try reading it instead of scanning quickly over it.

> So thats not very helpful.

Sure it is.  You're just impatient.  Machines go down for any number of
reasons.  It's up and working fine today.

-- 

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195