Subject: Re: User Directory CHROOT and ls

From: Chris Strong <[email-masked]>
Date: Mon, 18 Aug 1997 10:47:48 -0400

----------- Original message follows -----------
On 17 Aug, Mike Hedlund wrote:
> 
> 
> If you chroot() you need to have a "/dev/tcp and /dev/zero".. so make
> /export/home/dev and stick tcp and zero in it. and if i recall, on 
solaris
> 2.4 you also need a "/etc/netconfig" altho i could be mistaken.. 

	Oh boy... this  is the standard response  all over again.  The
list archives is full with this answer...  :'(

	Two or three weeks ago  I've  posted a similar question  about
2.4.13. I've followed  the  FAQ, Sun anonymous  FTP man  page with the
setup  script, played with ~ftp/devices, and  several  other crazy (?)
things that came on my mind.

	The problem is not  only  with "dir" or  "ls". The  problem is
also with  "get" and "put"  (everything that tries to open "/dev/tcp",
that is  the bind() function fails).  Probably  I'm missing some basic
thing, but anyway:

	Is  there any success story    with anonymous FTP (chroot  and
/dev/* on the chroot'd tree) on Solaris 2.x on ***SPARC*** ?

	best regards,
	</canau

> 
> -mike
> 
> On Mon, 18 Aug 1997, Kevin Billings wrote:
> 
>> I have wu-ftp2.4 beta 14 setup on solaris 2.4 for our users so when 
they
>> login they are chroot to /export/home, but i get the following 
message:
>> 
>> 
>> 200 PORT command successful.
>> LIST 
>> 425 Can't create data socket (0.0.0.0,20): Bad file number.

-- 
Carlos Canau

----------- End of original message -----------
ls -la of ~/dev
d--x--x--x   2 root     other        512 Aug 15 14:53 .
dr-xr-xr-x  12 root     other        512 Aug 15 17:32 ..
cr--r--r--   1 root     other     11, 42 Aug 15 14:52 tcp
cr--r--r--   1 root     other    105,  1 Aug 15 14:53 ticotsord
cr--r--r--   1 root     other     11, 41 Aug 15 14:53 udp
cr--r--r--   1 root     other     13, 12 Aug 15 14:53 zero  

ls -la of ~/usr/lib
d--x--x--x   2 root     other        512 Aug 15 14:57 .
d--x--x--x   4 root     other        512 Aug 15 14:54 ..
-r-xr-xr-x   1 root     other      24576 Aug 15 14:56 ld.so
-r-xr-xr-x   1 root     other     137160 Aug 15 14:56 ld.so.1
-r-xr-xr-x   1 root     other     664100 Aug 15 14:56 libc.so.1
-r-xr-xr-x   1 root     other       2564 Aug 15 14:56 libdl.so.1
-r-xr-xr-x   1 root     other      15720 Aug 15 14:56 libintl.so.1
-r-xr-xr-x   1 root     other     570560 Aug 15 14:56 libnsl.so.1
-r-xr-xr-x   1 root     other      68780 Aug 15 14:56 libsocket.so.1
-r-xr-xr-x   1 root     other      39932 Aug 15 14:57 libw.so.1
-r-xr-xr-x   1 root     other       9332 Aug 15 14:57 nss_dns.so.1
-r-xr-xr-x   1 root     other      21144 Aug 15 14:57 nss_files.so.1
-r-xr-xr-x   1 root     other      24404 Aug 15 14:57 nss_nis.so.1
-r-xr-xr-x   1 root     other      28844 Aug 15 14:57 nss_nisplus.so.1
-r-xr-xr-x   1 root     other       9312 Aug 15 14:57 straddr.so.2 

If you aren't adament about using betaXX, check out the Sun freeware site 

http://smc.vnet.net/Solaris 2.5.html
for lots of pkgadd installable applications for Solaris, including 
wu-ftpd2.4

sunsoft.sun.com does have a link to above on their site, however they 
make several disclaimers that the freeware site is not officially 
affiliated with or supported by Sun Software Inc, so you're on your own.  
For kicks, I got the wu-ftpd package installed on Sparc Solaris 2.5.1 and 
handling anonymous ftp in 30 minutes.   

Chris Strong
IS Administrator
ON Technology
Net Mail: cstrong @ on.com
Web site: www.on.com