Subject: Re: ls on ftp ok; ls -la not ok ??

From: "Winkelmann, Udo / CRYSTAL PALACE" <[email-masked]>
Date: Sat, 11 May 1996 15:13:53 +0100

That damm.. libraries..
Thanks
Udo
At 15:23 08.05.1996 -0500, you wrote:
>On Wed, 8 May 1996, Winkelmann, Udo / CRYSTAL PALACE wrote:
>
>> when I do an ftp to my anonymous user of the wu-ftp and then ls the directoy
>> ervything is fine, when I do an ls -la a core is dumped.
>> What is wrong with my setup?
>
>Sounds like 'ls' is running wu-ftpd's internal version of ls.  The 'ls -la' 
>is definitely running /bin/ls, and that is what is faulting.  You may
>be missing some dynamic libraries or some such thing. 
>
>   -- Michael
>
>

-----------------------------------------------
Udo Winkelmann
Irisstrasse 13
Eriskrich, 88097
Germany
Phone: +49 7541 / 981296
email: [email-masked]
-----------------------------------------------

---

From: Paul Wade <[email-masked]>
Date: Sat, 11 May 1996 16:49:14 -0400

> >be missing some dynamic libraries or some such thing.

Yes, I too have the same problem. I wish I knew how to easily determine the libraries needed so
I would know which ones to put in ~ftp/lib .

Also, I would like to get the source and make a statically linked version.

The new question arises: If ftpd needs static-ls or copies of libs, how will that affect memory
usage? I assume that the first daemon will be the culprit and additional sessions will share it.
My speculation is that perhaps a static-ls will be worse for multiple sessions if not compiled
and linked properly. It would be great if somebody could tell us a safe way to use the ls and
lib files that are already on the system before adding ftpd.

! READ ON - PERHAPS I CAN DO MY PART !

About me - I do have a background that precedes PC's. I did HW products and wrote device
support for it on UNIX and other OS's in the 80's.

I am running Slackware 3.0 Linux and wu-ftpd 2.4.2 beta 11 . I have the latest NCSA httpd on 
my LAN and am using it to "test drive" my pages/cgi/perl before I ship it to the live server.
However, as soon as my local backwoods Telecom company gets up to date, I will be putting my
wtop.com domain here with www, ftp, mail and more. This domain is intended to be technically
oriented. The first topics addressed are outlined herein.

WOPL's WELL ORDERED PROCEDURE LISTS
I have wound up with 2 Slackware CD's in order to get the books they came with. Both books
have deficiencies. I am the type that can usually get started with a single checklist and
do the customizing later. I will be posting pages at wtop.com with the proper procedure
explained for many common setups. Links to common definitions and subprocedures would be
a nice touch.

here is a good example of time and money misallocated

book1 - the CD includes a "security fixed" version of wu-ftpd. Necessary lines in
	/etc/inetd.conf
	/etc/passwd
	/etc/group
are not given, even though the default files created from same CD need changes.
Book says to simply copy /bin/ls and chmod, chown it.

book2 - better but says to maybe put libc.so.1 and rld into the ~ftp/lib directory and
make a ~ftp/dev/zero device(rld needs it). I have no rld lib on my system. Says to do
this step only if ls requires it. Debug logging shows zip.

Neither book tells me how to just get an obedient and unsecure ftpd up. I just want to
move CD and internet-obtained files over the LAN and get this box configured. Right now,
I can do that by typing each cd and stor command. I then switch to my open telnet window
and move,make, etc.

Neither book tells me how to deal with the Slackware trans.tbl files easily. These are
the files that map the CD(msdos) files to the linux destination. I will have to write
some perl to do this and post it.

Neither book tells me that some ln -s commands may be required to make wu-ftpd. I had
just trimmed my kernel and had to figure out which links to restore before I could
compile wu-ftpd.

CRAM's COMMONLY REPEATED EMAIL ANSWERS
Looking at the archived messages from this and other lists, I can see how it would be easier
to reply with a URL to many common questions e.g. "try http://www.wtop.com/wu-ftpd/foo-111 for
that one"

BGHOS Bill-ionare Gates HALL OF SHAME (pronounced bug-Oh-ess)
I have been severely burned more than once by Microsoft crapware. I am trying to eliminate
all of it from my LAN. I notice that as I move functions off of WFWG/W95 boxes, they don't need
rebooting as often. The only application that seems to run OK for extended periods is a simple
screen saver. 

FREE SOFTWARE ADVOCACY
Interesting that Slackware 3.0 correctly probes my ports and finds the right IRQ's.
Microsoft does not. The "average" user could not get $25 NE2000 cards working with
MS based OS's easily. Even if he could, MS products are resource pigs. My old 386
is now "serving" me with linux.

People, I will be bringing up topoftheworld.com and wtop.com in the next few days. Visit
often and let me know what is needed.

Paul Wade - backwoods networker

---

From: Michael Brennen <[email-masked]>
Date: Sat, 11 May 1996 16:20:43 -0500 (CDT)

> I would know which ones to put in ~ftp/lib .

For linux, use 'ldd' to see what libraries are needed.

For Solaris, use 'truss'.

Not sure of other OSes.

   -- Michael

---

From: Paul Wade <[email-masked]>
Date: Sat, 11 May 1996 18:47:29 -0400

> For Solaris, use 'truss'.

Well done! It's working! Only took a few minutes!

I have pasted in the stuff from my telnet window.

boonies:/home/ftp/lib# ldd -vVrd /bin/ls
ldd: version 1.7.3
/lib/ld.so: version 1.7.3
        libc.so.5 => /lib/libc.so.5.0.9
boonies:/home/ftp/lib#                

By typing man ldd, I was able to get an idea of the linux loader libraries required:

       For  ELF  programs,  ldd forks and execs each program with
       the  appropriate  environment  variables  set.   The   ELF
       dynamic  linker,  ld-linux.so,  which  normally  loads the
       shared libraries, notices this special case and prints the
       dependencies.
The closest match I found was ld-linux.so.1

boonies:/home/ftp/lib# cp /lib/ld.so .
boonies:/home/ftp/lib# cp /lib/libc.so.5 .
boonies:/home/ftp/lib# cp /lib/ld-linux.so.1 .
boonies:/home/ftp/lib# ls -l
total 598
-rwxr-xr-x   1 root     root        20722 May 11 18:13 ld-linux.so.1*
-rwxr-xr-x   1 root     root        20484 May 11 18:07 ld.so*
-rwxr-xr-x   1 root     root       562683 May 11 18:10 libc.so.5*
boonies:/home/ftp/lib#

I switched to the ftp window and connected, got a listing now. Went ahead and copied a whole directory
structure over to test.

I will put all this up in HTML and post the URL. If anybody wants pretty graphics take some
Magic Markers and draw on your screen.

Paul

---

From: [email-masked] (Winfried Magerl)
Date: Sun, 12 May 1996 13:49:37 +0200 (MDT)

> For Solaris, use 'truss'.

You can use ldd also on solaris2 and some other SVR4-Unixes (not all but most
of them). On SGI's with IRIX5 theres no ldd and no truss. Use "par -s -SS"
and check the output for loaded files.
Additional you can do a "chroot /your/ftp/home /bin/ls" and check the error
messages.
A good hint I think is to read the manuals for the system-ftpd. In all manpages
Isee there is a description how th set up a chroot-directory for ftpd.

regards

	winfried

--
Winfried Magerl - Internet Administration
Siemens Business Services, 81739 Munich, Germany
Internet-Mail: [email-masked]