Subject: Re: 425 Can't create data socket (0.0.0.0,20): Bad file number.

From: [email-masked] (Miquel Cabanas. BBM-UAB)
Date: Wed, 23 Oct 1996 19:34:19 +0200

> From [email-masked] Wed Oct 23 03:59:54 1996
> 
> Solaris 2.4 sun4c
> 
> At 4:42 PM +1000 22/10/96, Vincent Cojot wrote:
> >crw-rw-rw-   1 root     other     11,  9 Aug 15  1994 ticotsord
> 
> At 5:21 PM +1000 22/10/96, Miquel Cabanas. BBM-UAB wrote:
> >   crw-rw-rw-   1 root     other    105,  1 Mar 22  1996 ticotsord
> 
> I just realised that Miquel and Vincent have different device numbers for
> ticotsord whatever that is.
> 
> /home/ftp/dev# ls -l
>
> crw-rw-rw-   1 root     other    105,  1 Oct 23 10:24 ticotsord

about the major and minor no. They can change from OS to OS and from
release to release. After all is an internal matter, as long as they
are internally consistent the value doesn't mind. So, get yours from
the /devices/pseudo entries in your system,

   > ls -l /devices/pseudo/*ticotsord
   crw-rw-rw-  1 root  sys  105,  1 Mar 20  1996 /devices/pseudo/tl@0:ticotsord

> 
> Oct 23 11:50:39 fred ftpd[459]: setsockopt (SO_OOBINLINE): Invalid argument
> Oct 23 11:50:39 fred ftpd[459]: fcntl F_SETOWN: Invalid argument
> 

F_SETOWN? this isn't supported under Solaris!  In the file ~wuftpd/config.h
undef its entry,

	#undef  F_SETOWN

and recompile wuftpd

then we'll see if this is the only cause of headaches. miquel

Miquel E Cabanas ---------------------------------------------------
SeRMN & BBM - Universitat Autonoma de Barcelona, Catalunya - Spain

e-mail: [email-masked]
url:    http://bbm-web.uab.es/biomed-nmr/miquel_angles.html
------------------------------------------o-oo--ooo---ooo--oo-o-----

---

From: Kim Holburn <[email-masked]>
Date: Thu, 24 Oct 1996 09:57:17 +1000

>/devices/pseudo/tl@0:ticotsord

OK, my system has 105,1. I tried those numbers, it didn't help.

>F_SETOWN? this isn't supported under Solaris!  In the file ~wuftpd/config.h

I did a standard compile by typing "build sol" and when I checked
src/config.h it already contains the line:
#undef  F_SETOWN

but when I examine ftpd.c the line
#include "config.h"
occurs at the top of the includes and further down:

#if defined(SVR4) || defined(ISC)
#include <fcntl.h>
#endif

Now /usr/include/fcntl.h sets F_SETOWN, well actually

/usr/include/fcntl.h contains the line: #include <sys/fcntl.h>
and /usr/include/sys/fcntl.h contains the line:
#define F_SETOWN        24      /* Set owner (socket emulation) */

So how do I stop F_SETOWN being defined?  And why is it in the headers if
it isn't supported?  (No don't worry about answering that.)

Kim

--
+-------------------------+--------------------------------------------+
| Kim Holburn             |  Internet : [email-masked]            |
| Computer Centre ISD     |  PGP Public Key :                          |
| University of Canberra  |   finger -l [email-masked] |
| PO Box 1 Belconnen      |  Phone    : (06)201 5512, (06)201 5500     |
| ACT  Australia  2617    |  Fax      : (06)201 5502, (06)201 5501     |
+-------------------------+--------------------------------------------+
|      born again and again and again and again and again buddhist     |
|                      well... in a previous life anyway  :-)          |
+----------------------------------------------------------------------+

---

From: Kim Holburn <[email-masked]>
Date: Fri, 25 Oct 1996 14:03:01 +1000

Solaris 2.4 sun4c

If I run the following command:

kim(root)@fred:~ftp
# chroot ~ftp /bin/echo fred
ld.so.1: /bin/echo: fatal: /dev/zero: can't open file: errno=6
Killed
Exit 137
kim(root)@fred:~ftp
# chroot ~ftp /bin/ls
ld.so.1: /bin/ls: fatal: /dev/zero: can't open file: errno=6
Killed
Exit 137

I have an idea that the devices aren't working. I have:
crw-rw-rw-   1 root     other     13, 12 Oct 21 12:05 ~ftp/dev/zero
lrwxrwxrwx   1 root     root          27 May 30  1995 /dev/zero ->
                                                    ../devices/pseudo/mm@0:zero
crw-rw-rw-   1 root     sys       13, 12 Oct 26  1994 /devices/pseudo/mm@0:zero

If I try and read the real /dev/zero with "more" it does things, if I try
this with the ~ftp/dev/zero:

# more ~ftp/dev/zero
~ftp/dev/zero: No such device or address
Exit 1

Is this OK?  How else do you make these devices apart from mknod?

Kim

---

From: Kim Holburn <[email-masked]>
Date: Sat, 26 Oct 1996 19:22:12 +1000

>Solaris 2.4 sun4c

I got the device problem sorted out, nosuid set in vfstab.  Thanks to
whoever posted that, but I still have a problem.

list
425 Can't build data connection: Address family not supported by protocol
family

#tail /var/adm/messages
Oct 26 19:11:44 fred ftpd[1066]: setsockopt (SO_OOBINLINE): Invalid argument

I recompiled wu-ftpd with an extra line after all the includes
#undef F_SETOWN

that was the only way I could see to get rid of F_SETOWN.  I will have to
do that with the other binaries too I suppose.  But there is still
something clearly wrong because it doesn't seem to be able to open the data
connection.

Kim

--
+------------------------+------------------------+-----------------------+
|       Kim Holburn      | Computer Centre        |                       |
|                        | University of Canberra | phone : +61 6 2015500 |
|   Internet address :   | P.O. Box 1 BELCONNEN   |         +61 6 2015512 |
|  [email-masked]   | ACT 2616 AUSTRALIA     | fax   : +61 6 2015501 |
+------------------------+------------------------+-----------------------+
|       born again and again and again and again and again buddhist       |
|                     well... in a previous life anyway  :-)              |
+-------------------------------------------------------------------------+

---

From: Karl <[email-masked]>
Date: Sat, 26 Oct 1996 15:11:14 -0700

Sorry to bother you all with this but...
After using wu-ftp for a while, I have only recently had to try virtual
ftp hosting. I noticed in the ftpaccess man file that
	"Your operating system may not support this feature.
	 It has been tested on BSD/OS, Solaris 2.X and Linux."
Has anyone had any luck with IRIX?
I included the "virtual <address> <root> <path>" line, but it seemed to
have no effect. I get the same document root that I have been using all
along.
Is beta-11 completely "patched" for virtual hosting?
Any feedback would be greatly appreciated.
Thanks.