Subject: Re: chroot() and ls don't work together

From: Yanming PENG <[email-masked]>
Date: Mon, 21 Aug 95 15:08:53 WETDST

> 
> Hi,
> 
> I've been following this list for a few months now, and I don't know how 
> many times I've seen this question:
> 
> wu-ftpd 2.4.2beta5 from Academ
> linux 1.2.10 and 1.2.13 
> Shadow on one, not on the other (irrelevant for this problem, apparently)
> 
> I have some guest ftp accounts (like, several thousand of them). They're
> all part of group ``ftponly'', and in my /etc/ftpaccess, I have
> guestgrouped ``ftponly''. I set their home dir to be /home/./username, and
> they get chroot()'ed just fine. However, they cannont get a directory
> listing of any kind! If I do not guestgroup them (e.g. they are now type
> ``real'') they don't get chroot()'ed, but get directlry listings just
> fine. 
> 
> I have put a statically-linked ls in ~ftp/bin, thinking that the chroot()

Wrong! It works only for anonymous. You should put it in ~username/bin too,
because ~username is the root after chroot().

> was breaking any possible searches for /lib/libc.so.x. I have put libc.so
> in ~ftp/lib and ~ftp/usr/lib. I have created ~ftp/dev/zero. The only piece
> that seems to be missing is libdl, which apparently does not exist for
> a.out linux. 
> 
> Has anyone successfully gotten this working with linux? Soneone told me
> that libdl.so.* is part of the linux ELF libraries, so I am actually
> converting a machine to ELF, hoping that the missing libdl is my problem,
> and that this will resolve it. 
> 
> Any clues?
> 
> Chris Woods                                               [email-masked]
> GCM/CS/E   d---  H++ s+:++ !g  p? au-- a- w+  v++ C++ UL++++ P++>++++ L+++
> 	   E++>+++ N+ K++ W--- M-- V-- -po+ Y+ t+ !5 !j R G? tv-- b+ D+ B-
> 	   e+ u+ h---- f r+++ n---- y++++
> Network Administrator 	    	 USAinternet, Inc.  	      508-774-4700
> 
--
Yanming PENG
[email-masked]

---

From: Chris Woods <[email-masked]>
Date: Mon, 21 Aug 1995 11:29:26 -0400 (EDT)

> because ~username is the root after chroot().

Heh. That worked, thanks. Dumb on my part, that was one of the first
things I tried a couple days ago, but the copy of ls that I put in /home
was not the statically linked one. 

Thanks again.