Subject: [72] wu-ftpd under Solaris 2.3

From: Andrew Donkin <[email-masked]>
Date: Thu, 30 Jun 1994 17:14:34 +1200

I have built the WU ftp daemon version 2.4 on a Sun SS2 running Solaris
2.3, but am having problems using it.  For anonymous logins, all commands
except 'LIST" work fine.  'LIST' gives the following:

----------8<----------
425 Can't build data connection: Connection refused.
----------8<----------

Hmmm, sounds like the Linux problem so far, except that 'LIST' doesn't work
no matter how many times you try it.

Could a Solaris guru or a wu-ftpd guru scratch their head and mutter
incantations and heal me?  I'm DYING, and our anon ftp service is KAPUT!

So, I wheeled out 'truss' to take a look at the system calls 'ftpd' was
making.  Hang on to your seat - here it is, starting from where I typed
"list" and ending with it sending the error message to the client:

----------8<----------
read(0, " l i s t\r\n", 8192)                   = 6
time()                                          = 772951954
open("/usr/share/lib/zoneinfo/localtime", O_RDONLY, 035777764610) Err#2 ENOENT
getpid()                                        = 7853 [7852]
putmsg(3, 0xEFFFEF60, 0xEFFFEF54, 0)            = 0
alarm(0)                                        = 892
time()                                          = 772951954
open("/usr/share/lib/zoneinfo/localtime", O_RDONLY, 035777765210) Err#2 ENOENT
getpid()                                        = 7853 [7852]
putmsg(3, 0xEFFFF060, 0xEFFFF054, 0)            = 0
time()                                          = 772951954
getrlimit(RLIMIT_NOFILE, 0xEFFFDEE4)            = 0
pipe()                                          = 10 [11]
vfork()                                         = 7968
close(11)                                       = 0
seteuid(0)                                      = 0
open("/dev/tcp", O_RDWR, 035737751470)          = 11
ioctl(11, I_FIND, "sockmod")                    = 0
ioctl(11, I_PUSH, "sockmod")                    = 0
ioctl(11, I_SETCLTIME, 0xEFFFEE84)              = 0
ioctl(11, I_SWROPT, 0x00000002)                 = 0
sigprocmask(SIG_SETMASK, 0xEFFFEE74, 0xEFFFEE64) = 0
ioctl(11, I_STR, 0xEFFFECD8)                    = 0
ioctl(11, I_GETSIG, 0xEFFFED68)                 Err#22 EINVAL
sigprocmask(SIG_SETMASK, 0xEFFFEE64, 0xEFFFEE40) = 0
sigprocmask(SIG_BLOCK, 0xEFFFEE08, 0xEFFFEE7C)  = 0
ioctl(11, I_STR, 0xEFFFEE08)                    = 0
sigprocmask(SIG_SETMASK, 0xEFFFEE7C, 0x00000000) = 0
sigprocmask(SIG_BLOCK, 0xEFFFECB8, 0xEFFFED28)  = 0
ioctl(11, I_STR, 0xEFFFECB8)                    = 0
sigprocmask(SIG_SETMASK, 0xEFFFED28, 0x00000000) = 0
seteuid(50)                                     = 0
sigprocmask(SIG_BLOCK, 0xEFFFEE08, 0xEFFFEE7C)  = 0
ioctl(11, I_STR, 0xEFFFEE08)                    = 0
sigprocmask(SIG_SETMASK, 0xEFFFEE7C, 0x00000000) = 0
fcntl(11, F_GETFL, 0x00000000)                  = 2
sigprocmask(SIG_BLOCK, 0xEFFFECB0, 0xEFFFED54)  = 0
putmsg(11, 0xEFFFED64, 0x00000000, 0)           = 0
fcntl(11, F_GETFL, 0x00000000)                  = 2
getmsg(11, 0xEFFFED64, 0x00000000, 0xEFFFEC5C)  = 0
sigprocmask(SIG_SETMASK, 0xEFFFED54, 0x00000000) = 0
getmsg(11, 0xEFFFED64, 0xEFFFECB0, 0xEFFFECBC)  = 0
425 Can't build data connection: Connection refused.
write(1, " 4 2 5   C a n ' t   b u".., 54)      = 54

----------8<----------

The only hiccup looks like that ioctl which failed with EINVAL.

Real logins are fine.  I have put all the necessary libraries in the
necessary places, but by the looks of it the ftp daemon isn't even trying
to run 'ls'

Please please please *please* help me - I'm stumped.

Thanks in advance -

,------------------------------------------------------------------------,
|                   Andrew Donkin - [email-masked]                 |
|          Department of Computer Science, University of Waikato         |
`------------------------------------------------------------------------'

---

From: Mads Westermann <[email-masked]>
Date: Thu, 30 Jun 1994 08:52:43 +0200 (MESZ)

Andrew Donkin writes......
> except 'LIST" work fine.  'LIST' gives the following:

I'm experiencing exactly the same problems with SCO ODT 3.0 and so far
I haven't been able to find the cause of the problem.
> incantations and heal me?  I'm DYING, and our anon ftp service is KAPUT!

Me too ;-)

-- 
  Mads Westermann <[email-masked]> http://www.dd.dk/People/Mads_Westermann.html
 --------------------------------------------------------------------------
 * When winds of change blow some build shelters, others build windmills. *

---

From: Luke Mewburn <[email-masked]>
Date: Thu, 30 Jun 1994 19:15:31 +1000 (EST)

> Me too ;-)

here's a listing of the relevant system dirs in ~ftp on my anon ftp
server (wuftp 2.4, solaris 2.3). It may assist you in determining
which files in /dev, /lib, and /etc are necessary.

---
lrwxrwxrwx   1 root     other           7 Apr 28 10:58 bin -> usr/bin

dev:
total 0
crw-rw-rw-   1 root     sys       13,   2 May  4 11:22 null
crw-rw-rw-   1 root     sys       11,  42 Nov  8  1993 tcp
crw-rw-rw-   1 root     sys       11,   9 May  3 22:23 ticotsord
crw-rw-rw-   1 root     sys       11,  41 May  3 22:22 udp
cr--r--r--   1 root     sys       13,  12 Nov  8  1993 zero

etc:
total 5
d--x--x--x   2 root     sys           512 Apr 28 12:27 default
-r--r--r--   1 root     sys            76 Apr 28 11:09 group
-r--r--r--   1 root     sys           643 Nov 11  1993 netconfig
-r--r--r--   1 root     sys           727 Apr 28 12:28 nsswitch.conf
-r--r--r--   1 root     sys            90 Nov  8  1993 passwd

etc/default:
total 1
-r--r--r--   1 root     sys           470 Apr 28 12:27 init

tmp:
total 0

usr:
total 4
d--x--x--x   3 root     sys           512 May 24 12:38 bin
d--x--x--x   2 root     sys           512 May  3 22:48 lib
d--x--x--x   2 root     sys           512 Apr 28 12:01 local
d--x--x--x   3 root     sys           512 Apr 28 12:29 share

usr/bin:
total 667
-r-xr-xr-x   1 root     sys           385 May  4 13:37 LIST
-r-xr-xr-x   1 root     sys           761 May  4 11:21 ZIP
-r-xr-xr-x   1 root     sys           519 May  3 22:42 ZOO
---x--x--x   1 root     sys          9004 May  4 11:23 cat
---x--x--x   1 root     sys         14428 May  4 11:20 compress
---x--x--x   1 root     sys         15580 May  4 11:20 expr
---x--x--x   1 root     sys         15932 May  4 11:46 find
d--x--x--x   2 root     sys           512 May 23 18:49 ftp-exec
-rwxr-xr-x   1 root     sys           509 May 25 11:19 genindex
---x--x--x   1 root     sys         16564 May 22 19:09 grep
---x--x--x   1 root     sys         59696 May  4 11:20 gzip
---x--x--x   1 root     sys         19916 May  4 11:20 ls
-r-xr-xr-x   1 root     sys            92 May 24 12:38 mirror_and_index
---x--x--x   1 root     sys          7208 May  4 11:26 rm
---x--x--x   1 root     sys         85900 May  4 11:20 sh
---x--x--x   1 root     sys        186532 May  4 11:20 tar
---x--x--x   1 root     sys         61760 May  4 11:20 unzip
---x--x--x   1 root     sys         64468 May  4 11:20 zip
---x--x--x   1 root     sys         81816 May  4 11:20 zoo

usr/bin/ftp-exec:
total 5
---x--x--x   1 root     sys          4248 Jun 23 22:03 index

usr/lib:
total 1405
-r-xr-xr-x   1 root     sys         90312 Apr 28 11:02 ld.so.1
-r-xr-xr-x   1 root     sys        565048 Apr 28 11:02 libc.so.1
-r-xr-xr-x   1 root     sys          3296 Apr 28 11:02 libdl.so.1
-r-xr-xr-x   1 root     sys         12764 Apr 28 11:02 libintl.so.1
-r-xr-xr-x   1 root     sys        115308 May  3 22:48 libm.so.1
-r-xr-xr-x   1 root     sys        482976 Apr 28 11:02 libnsl.so.1
-r-xr-xr-x   1 root     sys         76088 Apr 28 11:02 libsocket.so.1
-r-xr-xr-x   1 root     sys         33052 Apr 28 11:02 libw.so.1
-r-xr-xr-x   1 root     sys         10496 May  3 22:21 nss_dns.so.1
-r-xr-xr-x   1 root     sys         16304 Apr 28 12:25 nss_files.so.1

usr/local:
total 1
lrwxrwxrwx   1 root     other           6 Apr 28 12:01 bin -> ../bin

usr/share:
total 1
d--x--x--x   3 root     sys           512 Apr 28 12:29 lib

usr/share/lib:
total 1
d--x--x--x   3 root     sys           512 Apr 28 13:41 zoneinfo

usr/share/lib/zoneinfo:
total 2
d--x--x--x   2 root     sys           512 Apr 28 12:29 Australia
lrwxrwxrwx   1 root     other          18 Apr 28 13:41 localtime -> Australia/Victoria

usr/share/lib/zoneinfo/Australia:
total 1
-r--r--r--   1 sys      other         725 Apr 28 12:29 Victoria

---
Luke Mewburn             UNIX Systems Programmer, Technical Services Group
<[email-masked]>               Department of Computer Science, RMIT.