Subject: Anonymous user and 'dir' command

From: Larry Kline <[email-masked]>
Date: Tue, 07 Jul 1998 17:30:04 -0700

I have spent about a day and half trying to allow an anonymous user

to get results back from the 'dir' command but still no luck.  So

far this is what I have tried:

Obtained newest wu-ftpd (beta 18)

Compiled for my platform (RedHat Linux 4.2 Kernel 2.0.30 on i486)

<paraindent><param>left</param>Several compilation problems because I
didn't have a copy of

libc.a

</paraindent>Installed the binaries

Obtained a version of the GNU file utilities (fileutils-3.16)

Modified the Makefiles to add -static linker option

Compiled

Checked ls with ldd

<paraindent><param>left</param>Still says that it depends on libc.so.5 =>
/lib/libc.so.5.3.12

</paraindent>Installed the ls and dir binaries anyway

Still the 'dir' command returns no output when I log in as anonymous.

This happens from a command line ftp, a GUI ftp client, or a web browser.

I also notice that I can remove ls and dir from my ~ftp/bin directory

with no effect on this behavior.  It seems that these binaries are not

even being used.

If I do a /usr/sbin/chroot ~/ftp/bin ls I get 

	execvp: No such file or directory

Same for dir

This happens with the GNU binaries as well as the original RedHat ones.

I'm lost!  Any help would be appreciated.

Thanks,

Larry Kline			email:	[email-masked]

DNS Technologies, Inc.		phone:	1-415-536-1611 (direct)

160 Spear Street, Suite 320	phone: 	1-415-536-1600 (main)

San Francisco, CA.  94105	fax:	1-415-536-1616

USA				WWW:	http://www.dnstech.com

---

From: Michael Brennen <[email-masked]>
Date: Tue, 7 Jul 1998 19:59:44 -0500 (CDT)

This is probably where you are hung up.  Work with fileutils until you
get ld to show that it is staticly linked and install that one.

   -- Michael

On Tue, 7 Jul 1998, Larry Kline wrote:

> Still says that it depends on libc.so.5 => /lib/libc.so.5.3.12
> Installed the ls and dir binaries anyway

---

From: "Michael Niksch" <[email-masked]>
Date: Wed, 8 Jul 1998 12:11:29 +0200

>   execvp: No such file or directory

The correct thing to try would be

  /usr/sbin/chroot ~ftp /bin/ls

By the way, you can also use a dynamically linked ls command and put a
copy of libc.a into the chroot environment as well.

-- 
Michael Niksch                     /Zurich/IBM @ Zurich @ IBM_Internal
IBM Zurich Research Laboratory     [email-masked] (NIK at ZURICH)
Saeumerstrasse 4                   http://www.zurich.ibm.com/~nik/
CH-8803 Rueschlikon / Switzerland  P: +41-1-724-8913 F: +41-1-724-8959