Subject: RE: Guest Account

From: Ken Hogan <[email-masked]>
Date: Thu, 15 May 1997 13:30:31 2359

> From [email-masked] Thu May 15 11:33 EDT 1997
> Date: Thu, 15 May 1997 11:13:47 -0400
> From: Clinton Fisher <[email-masked]>
> To: "[email-masked]'" <[email-masked]>
> Subject: RE: Guest Account
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> X-Listprocessor-Version: 8.0 -- ListProcessor(tm) by CREN
> 
> Ken, I take it that your ftp home directory is on an NFS mount point.  I
> ran into the same problem.  It is either that or the ~ftp/dev directory
> does not have the device files in them, or it otherwise misconfigured.
> The /dev directory does not work well being NFS mounted.
> 
> - Clinton Fisher
> - System Administrator
> 
> 
> >----------
> >From: 	Ken Hogan[SMTP:[email-masked]]
> >Sent: 	Thursday, May 15, 1997 6:56 AM
> >To: 	[email-masked]
> >Subject: 	Guest Account
> >
> >hey all,
> >
> >I am using (Version wu-2.4(14).  I created a user guest:
> >
> >/etc/passwd: 	guest:x:1002:666:Guest Account:/export/ftp/pub
> >/guest/./:/bin/csh
> >/etc/group: 	ftponly:*:666:guest
> >/etc/ftpaccess:	guestgroup	ftponly
> >
> >When I log in as guest it goes to the correct directory but
> >"ls" doesn't work and I get an error:
> >
> >ftp> ls
> >200 PORT command successful.
> >425 Can't create data socket (0.0.0.0,20): Bad file number.
> >
> >If a put I get same error:
> >
> >ftp> put R13.ZIP
> >200 PORT command successful.
> >425 Can't create data socket (0.0.0.0,20): Bad file number.
> >
> >It creates the file empty.
> >
> >Thanks in Advance
> >Ken Hogan
> >
> 
The /export/ftp directory is on a mounted partition of the local drive.
What is strange is if I change directory to a folder in the account, ls
works but ls -ls doesn't.  The /export/ftp/dev files are there and correct.
All this worked prior wu-ftp using Sun ftp.  Any thoughts?

Ken Hogan

---

From: Alain Magloire <[email-masked]>
Date: Thu, 15 May 1997 15:13:04 -0400 (EDT)

> All this worked prior wu-ftp using Sun ftp.  Any thoughts?

Yes I've recall having this problem, or something similar
I think if the partiion is NFS you must also have

~ftp/dev/ticlts

it is due to the NFS locking scheme(that's all I remember)
ticlts, ticots, ticotsord, etc .. are part of the XTI/TLI STREAMS
stuff.

At on point, we had lots of wu-ftpd-HOWTO's on Solaris, but
I lost track, If you're patient and browse the archive,
you could dig some pointers.

or man ftpd 
the man page contains a script

-- 
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!

---

From: Rob Holley <[email-masked]>
Date: Thu, 15 May 1997 17:43:41 -0400

> All this worked prior wu-ftp using Sun ftp.  Any thoughts?

This works for a normal mount, but can't say anything for NFS... have 
not tried that yet :-)

OK there are 4 devices you will have to setup in the ~ftp dir. If you
have
multiple guest accounts I suggest setting up the dev files in one dir
and
hard linking the rest of the ftp users directories. *But remember you
can
not span FS's with hard links and you will need that inode map to have
a link work in the chroot env.

Anyway here are the devs for SPARC and x86:

x86...

hal:45:/home/archive/dev # ls -la
total 4
drwxr-xr-x   2 root     other        512 May 12 21:12 ./
drwxr-xr-x  10 root     root         512 May 13 10:50 ../
crw-rw-rw-   5 root     other     11, 42 May 12 21:10 tcp
crw-rw-rw-   5 root     other     99,  1 May 12 21:11 ticotsord
crw-rw-rw-   5 root     other     11, 41 May 12 21:11 udp
crw-rw-rw-   5 root     other     13, 12 May 12 21:10 zero
hal:46:/home/archive/dev # 

SPARC....

pilsner:/dev:14>ls -lL tcp ticotsord udp zero
crw-rw-rw-   1 root     sys       11, 42 Oct 18  1996 tcp
crw-rw-rw-   1 root     sys      105,  1 Oct 18  1996 ticotsord
crw-rw-rw-   1 root     sys       11, 41 Nov  2  1995 udp
crw-rw-rw-   1 root     sys       13, 12 Nov  2  1995 zero
pilsner:/dev:14>

you can create these by the mknod command

>mknod name c major minor
ex:
>maknod tcp c 11 42

** remember to set the perms to 666

Once these are made on the slice you can hard link to them from any
directory on the same slice.

There are also several libs you will need to put in a ~ftp/usr/lib
directory
these can also be hard linked from one place on the same slice

libs:
 
 ld.so*
 libc.so*
 libdl.so*
 libintl.so*
 libw.so*
 libnsl.so*
 libsocket.so*
 nss_nis.so*
 nss_nisplus.so*
 nss_dns.so*
 nss_files.so*
 straddr.so*

One last thing there is a command that will layout a binary in the
chroot
environment and show you every problem you might be having... libs not
there,
can't find device....

>truss -d chroot ~ftp /bin/ls

Also... take a look at the man pages for ftpd, they are really helpful.

Good Luck,
-- 
Rob
                                                 \\|// - ?
                                                 (o o)
          /==================================oOOo=(_)=oOOo========\
          |  Rob Holley  "UNIX Guy"        [email-masked]       |
          |  University of Florida      [email-masked]  |
          |  IFAS Academic Programs                               |
          |                                 .oooO                 |
          |  http://www.hal-net.com/~robh    (  )  Oooo.          |
          \===================================\ (==(   )==========/
                                               \_)  ) /
                                                   (_/