Subject: problems

From: [email-masked] (Doug Rheaume CS/50)
Date: Thu, 09 Nov 1995 10:01:50 -0500 (EST)

> I have just installed ftpd on a SUN Sparc 20 machine running Solaris 2.4
 > 
 > Everything works OK when I login as a real user. 
 > However, when I login as anonymous, 
 > I get the following error when I type ls, dir, get, etc.
 >  
 >     Can't create data socket (0.0.0.0,20): Bad file number
 >  
 > I have looked at the /var/adm/mesages and there isn't any errors recorded.
 > 
 > Any suggestions/pointers ??
 > 
 > thanks for any help
 > Doug Rheaume
 > 
 > GM Research Labs
 > [email-masked]
 > (810)986-1469
 >

---

From: Jeffrey Weiss <[email-masked]>
Date: Thu, 9 Nov 1995 09:15:50 -0600 (CST)

>  >     Can't create data socket (0.0.0.0,20): Bad file number

Confirm that you created your ftp directory with pub,etc,dev,bin,usr 
directories with the necessary files as specified in the docs. You MUST
have not only 'ls' in bin, but all of its dynamic libraries as well.
Determine this with: ' ldd ls' .

Here's a list of my chrooted ftp usr/lib directory for Solaris 2.3 on 
Sun1000:

ld.so             libdl.so.1        libsocket.so      nss_nisplus.so.1
ld.so.1           libintl.so        libsocket.so.1    straddr.so
libc.so           libintl.so.1      libw.so           straddr.so.2
libc.so.1         libnsl.so         libw.so.1
libdl.so          libnsl.so.1       nss_files.so.1

Also make sure that you properly CREATE the chrooted device files.

Good luck. I've been there!

Jeff

>  > Any suggestions/pointers ??

___________________________________________________________________________
Jeffrey Weiss UNIX administrator    [email-masked]
TIES - Technology and Information Educational Services www.ties.k12.mn.us
(612)638-2311  fax (612)631-7519 1925 W. County Rd. B2,  Roseville, MN 55113

---

From: Jelle van Zeijl <[email-masked]>
Date: Thu, 9 Nov 1995 16:40:46 +0100 (MET)

> Determine this with: ' ldd ls' .

True.

> Also make sure that you properly CREATE the chrooted device files.

Last time I got that error message was when I copied the ftp-setup to
another machine. Because of the special files in the dev directory I used
cpio. Turned out that cpio on Solaris 2.4 (SPARC and x86 version) doesn't
put the major device number in the cpio-archive unless you use the -c
option (which, according to the man page, is needed "when the origin and
the destination machines are different types"):

  % ls -l
  crw-rw-rw-   1 root     ftp       11, 42 Apr  4  1995 tcp
  crw-rw-rw-   1 root     ftp       99,  1 Apr  4  1995 ticotsord
  crw-rw-rw-   1 root     ftp       11, 41 Apr  4  1995 udp
  crw-rw-rw-   1 root     ftp       13, 12 Apr  4  1995 zero

  % ls | cpio -o | cpio -itv
  crw-rw-rw-   1 root     ftp        0, 42 Apr  4 16:13 1995, tcp
  crw-rw-rw-   1 root     ftp        0,  1 Apr  4 16:13 1995, ticotsord
  crw-rw-rw-   1 root     ftp        0, 41 Apr  4 16:13 1995, udp
  crw-rw-rw-   1 root     ftp        0, 12 Apr  4 16:13 1995, zero

but:

  % ls | cpio -oc | cpio -itv
  crw-rw-rw-   1 root     ftp       11, 42 Apr  4 16:13 1995, tcp
  crw-rw-rw-   1 root     ftp       99,  1 Apr  4 16:13 1995, ticotsord
  crw-rw-rw-   1 root     ftp       11, 41 Apr  4 16:13 1995, udp
  crw-rw-rw-   1 root     ftp       13, 12 Apr  4 16:13 1995, zero

Probably I don't use cpio often enough ... :-)

-- Jelle van Zeijl - [email-masked] - West Consulting B.V. --

---

From: [email-masked] (Koos van den Hout _U nix and we all_)
Date: Thu, 9 Nov 1995 17:18:58 +0100 (MET)

>  > Any suggestions/pointers ??

You need ~ftp/dev/tcp and ~ftp/dev/zero

One pointer :

http://www.hvu.nl/~koos/wu-ftpd-faq.html

                                       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