Subject: HELP!

From: [email-masked]
Date: Wed, 27 May 1998 12:31:50 -0700

Hi,

 Our Unix Administrator is on vacation so I'm filling in and I'm stuck.
Here is what I'm trying to do.

 We have a UNIX Sun box running 4.1.3(I don't know why haven't upgraded to
Solaris) where we run our mail server, web server, and also do some
development.  We also give customers access to the machine so that they can
FTP files to and from our company.  What I would like to do is pretty much
the same thing as having an anonymous account; allow customers to FTP to
the machine, but only allow them to see the anonymous directory and the
sudbirectories below.  The only thing that I want to be different is that I
want each client to have their OWN login and directory.  Each client should
NOT be able to see the other clients directories and files(I would be able
to use the anonymous account if this weren't a concern).  From what I
understand, when an anonymous user FTPs to a site, FTP will chroot to the
anonymous directory effectively making the anonymous directory root to the
anonymous user.

I downloaded and installed a copy of wu-ftpd which is supposed to do what I
want.  I bascially set up a clients directory as I would the anonymous
users (I make  etc,bin,usr,usr/lib subdirectories under the user's home
directory and also copy ls in the bin directory; I also create a dev
directory and do a mknod on tcp, and zero).  I make an /etc/ftpaccess file
in which the user's group in included in guestonly.  For example:

/etc/passwd
NGS:password:100:400:NGS Client:/p1/clients/NGS/./:bin/ftponly   /* I may
have forgotten the exact format*/

/etc/group
FTP:*:400:NGS

/etc/ftpaccess
guestonly FTP

I changed the in.ftpd line in /etc/inetd.conf to include the -a option.
>From what I read, this should do it.  When I FTP into our machine, I get
into /p1/clients/NGS, but FTP DOESN'T chroot to /p1/clients/NGS.  The "/./"
in /etc/passwd after the home directory should cause FTP to chroot to
/p1/clients/NGS, but for some reason it doesn't.  As a result, I can cd all
the way up to root.  Obviously this is not what I want to have happen.

At this point, I don't know what I've done incorrectly, or what else I need
to do.  I believe wu-ftpd is able to do what I want, but perhaps I'm
mistaken.  It seems that the only problem I'm facing is that FTP doesn't
chroot to /p1/clients/NGS, and once I can get it to do this, I should be
okay.  I should mention that I was able to get the NGS user to login and be
chrooted to their home directory.  I was able to accomplis this by writing
a small program that would determine a login users's ID and home directory,
change and chroot to the home directory, and finally set the ID to the
users's ID.  I called this program in place of using a shell in position 7
in /etc/passwd.  When I try this with FTP, FTP doesn't run the program.

So, if someone knows why this isn't working and what I need to do, please
let me know.

Thanks so much for your help!
Andy

---

From: Gregory A Lundberg <[email-masked]>
Date: Wed, 27 May 1998 15:50:48 -0400 (EDT)

> anonymous directory effectively making the anonymous directory root to the

What you're looking to do is called 'guestgroup' and there's a howto
referenced from the FAQ which will lead you through it.  At first glance,
I wonder if you've got /bin/ftponly in /etc/shells, if the users are in a
real Unix group you'll be using to control the guest access, and if you've
added the guest group control statements to your ftpaccess.

Also, you'll want to check the FAQ and Resource Center for any platform-
specific information you'll need (I know there's some for Solaris).

The location of the latest version of wu-ftpd can be found in the 
directory
 
      ftp://ftp.academ.com/pub/wu-ftpd/private/
 
You can't see the directory contents, so read the message informing you
of the actual filename to retrieve. It's there.
 
wu-ftpd Resource Center:  http://www.landfield.com/wu-ftpd/
wu-ftpd FAQ:              http://www.cetis.hvu.nl/~koos/wu-ftpd-faq.html
wu-ftpd list archive:     http://www.landfield.com/wu-ftpd/mail-archive/

----

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195