Subject: Re: dir command

From: [email-masked] (Robert McDaniel)
Date: Wed, 17 Jan 1996 16:23:19 +0100

>Yep, tried that, then I tried what was in the man page on my Solaris 2.4 system
>for setting up anon ftp.  That failed too.
>
>Somebody must have this running under Solaris 2.4.  Could one of you kind souls
>please send me an ls -lR of ~ftp.  Maybe I can figure it out from there.
>
>>>Ericw
>
>(I hate taking up bandwidth like this...) 
>(BTW: Im using Wu-ftp version 2.4, Solaris 2.4, The Sun Sparcworks compiler.)

This may not help because I'm on a Dec Alpha running osf, but I also had a
problem getting dir to work when I first setup wu-ftp. I had copied over
everything correctly, but dir was not working.

I don't remember where I found the answer, but it had to do with two
versions of ls on my system, one in /usr/bin/ and one in /sbin/. I had
copied the one in /usr/bin (which was much smaller by the way). When I
changed to the one from /sbin, dir worked correctly.

Just a thought.

_______________________

Robert McDaniel
Webmaster
The Palace Group
Time Warner

www.thepalace.com
[email-masked]
(818) 295 6624

_______________________

---

From: Chris Woods <[email-masked]>
Date: Wed, 17 Jan 1996 22:42:09 -0500 (EST)

> From Ericw:

>From Mr. McDaniel:

[...]

> changed to the one from /sbin, dir worked correctly.

I dunno if this was already suggested, but compile ls statically. This is
my guess as to the explanation for the fact that the version of ls that
works for Mr. McDaniel is much bigger than the one that doesn't work... 

You can get GNU ls from ftp://prep.ai.mit.edu/pub/gnu/fileutils-3.12.tar.gz.

    Chris Woods				Systems Administrator
    [email-masked]	 (office)	Paladin Computing Solutions
    [email-masked] (home)		http://www.paladin.com
    "A computer without Windows is like a fish without a bicycle."

---

From: Nathan Sowatskey x4758 <[email-masked]>
Date: Thu, 18 Jan 1996 10:11:14 -0200

There has been a great deal posted re: the dir and ls commands on
Solaris.

The dir and ls commands actually work differently; why I don't know.  I
don't believe that the linking, static or otherwise, is relevant for ls.

I have discovered that most PC clients will use the dir command, but
that a ftp from a unix or ftp shell will usually employ the ls command.

It is the dir command that needs the static libraries, and the the ls
command that needs the dev entries.

If you have ls working this does not mean that dir works.  

Everything works fine for me and here are the relevant parts of the
listing for my setup:

total 10
d--x--x--x   2 root     other        512 Dec 27 13:29 bin
drwxr-xr-x   2 root     other        512 Dec 27 15:08 dev
drwxr-xr-x   3 root     other        512 Dec 27 13:53 etc
drwxrwxrwx   4 ftp      other        512 Jan  2 13:41 pub
drwxr-xr-x   3 root     other        512 Dec 28 17:28 usr

./bin:
total 42
lrwxrwxrwx   1 root     other         13 Dec 27 13:29 ftp-exec ->
/bin/ftp-exec
---x--x--x   1 root     other      20040 Dec 27 11:24 ls

./dev:
total 0
crw-r--r--   1 root     other     13,  2 Dec 27 15:07 null
crw-r--r--   1 root     other     11, 42 Dec 27 13:50 tcp
crw-r--r--   1 root     other     11,  9 Dec 27 15:07 ticotsord
crw-r--r--   1 root     other     11, 41 Dec 27 15:08 udp
crw-r--r--   1 root     other     13, 12 Dec 27 13:51 zero

./usr:
total 2
dr-xr-xr-x   2 root     other        512 Dec 28 17:28 lib

./usr/lib:
total 1542
-r-xr-xr-x   1 root     other      97804 Dec 28 17:26 ld.so.1
-r-xr-xr-x   1 root     other     621628 Dec 28 17:26 libc.so.1
-r-xr-xr-x   1 root     other       3492 Dec 28 17:26 libdl.so.1
-r-xr-xr-x   1 root     other      13516 Dec 28 17:26 libintl.so.1
-r-xr-xr-x   1 root     other      41704 Dec 28 17:26 libw.so.1

Notice in particular the entries for dev and lib.

I hope that this will help all those people wandering in the dark.

Regards

Nathan

---------------------------------------------------------------------

Nathan Sowatskey - Software Systems - [email-masked] 
(27)(21)-414-4758
ATE Building, Jetty Street, Roggebaai, Cape Town 8001, RSA

	SAIX - The South African Internet Exchange from Telkom 
			http://www.saix.net

---

From: [email-masked] (Koos van den Hout _U nix and we all_)
Date: Thu, 18 Jan 1996 09:48:39 +0100 (MET)

> don't believe that the linking, static or otherwise, is relevant for ls.

'pure' ls is done as an internal command in wu-ftpd, without starting
anything external. This saves on process starting.

Offcourse this means the ls command (or better : the ftp command that
starts ls) will 'allways' work and that dir is a bit more sensitive.

                                                 Grtx. KH

-- 
  Koos van den Hout,           Internetter, Unix freak 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"
  We are root. You will be assimilated. Resistance is useless. Clickety Click

---

From: "David A. Smith" <[email-masked]>
Date: Thu, 18 Jan 1996 07:21:59 -0600 (CST)

> There has been a great deal posted re: the dir and ls commands on

This "problem" is not specfic to Solaris, but I belive to every UNIX 
that supports setroot.
 
> don't believe that the linking, static or otherwise, is relevant for ls.

When you just send an "ls" you trigger the built in command "NLIST" which 
does not use any executable at all.  You can get that standard listing 
WITHOUT any ls binary at all.  To see this use the standard UNIX ftp with 
-vd (verbose debugging) which will show what is really going on.

If you use the "dir" command (ls -l really) or send any switches ls (ie 
-F, etc) NLIST cannot understand them so it tries to run the "ls" 
binary.  Since wuftp does a setroot on anonymous connections to restrict 
access to only the ~ftp/ directory you must either have all the libaries 
in ~ftp/lib or wherever ls expects them from when it was compiled or you 
must compile it staticly.  In my option static compiling is both safer 
and easier.  

This is also why links to files or directories outside of the ~ftp/ 
directory do not work under wuftp.

> that a ftp from a unix or ftp shell will usually employ the ls command.

As do web browsers and most ftp clients with the exception of standard 
UNIX ftp.
 
> If you have ls working this does not mean that dir works.  

Correct.

-----------------------------------------------------------------------
David A. Smith                          | Baylor College of Medicine
Systems Services                        | Enterprise Services, MEDT1103
(713) 798-8469                          | One Baylor Plaza
Internet:  [email-masked]            | Houston, TX  77030