Subject: Re: chroot() function

From: [email-masked] (Bob Myers)
Date: Wed, 2 Oct 1996 16:35:49 -0700

On Oct 2, 19:08, Brian Beaulieu wrote:
} Subject: chroot() function
> I was wondering if anyone know how to use a chroot() function in wu-ftpd so
> that user's logging in had a path of / rather than a directory.  I know that
> the user 'ftp' has that function.. but I'm not sure how to go about doing
> it.  I did however, try to add to the 'ftpaccess' file but when I logged in,
> there were no files.
> 
> Thanks
> 
> Brian
> -- 
> ===================================
> CAPE Internet Systems Administrator
> http://www.capecod.net
> http://despair.capecod.net
> [email-masked]
> ===================================
> 
>-- End of excerpt from Brian Beaulieu

Hint: guestgroup in the ftpaccess file.

-- 
Bob Myers                              InteleNet Communications, Inc.
Email: [email-masked]               30 Executive Park, Suite 150
Phone: 714-851-8250 x227               Irvine, CA 92614
Fax:   714-851-1088                    http://www.intelenet.net/

---

From: [email-masked] (Bob Myers)
Date: Wed, 2 Oct 1996 18:41:32 -0700

On Oct 2, 20:08, Brian Beaulieu wrote:
} Subject: Re: chroot() function
> At 04:35 PM 96/10/02 -0700, you wrote:
> 
> Thanks :)
> This is the section from my ftpaccess
> -
> # specify which group of users will be treated as "guests".
> guestgroup ftponly user 
> -
> I'm assuming it wants system groups.. (ftponly isn't technically a group)
> Also, the account 'ftp' doesn't belong to any groups.

All accounts belong to at least one group.  Typically, it's the number in
the 4th field of the passwd file. 

Why isn't "ftponly" a group on your system if you've put it in the
ftpaccess file?  It should be. If it was, your problem would be *half*
solved...

> Any other 'hints'?

Go read the ftpaccess man page - look at the guestgroup section.

When you've done your homework and you still can't get it to work,
*then* ask us.

---

From: [email-masked] (Bob Myers)
Date: Wed, 2 Oct 1996 19:30:32 -0700

On Oct 2, 21:03, Brian Beaulieu wrote:
} Subject: Re: chroot() function
> At 05:55 PM 96/10/02 -0700, you wrote:
> >
> >and, in the password file setup the home directory path like,
> >
> >	/home/./user-dir
> >
> >The /./ tells chroot to use user-dir as the root directory (/).

No, it tells chroot to use /home as the root directory.

> This is the test user's passwd entry:
> brian:*:109:100:,,,:/usr/home/./brian:/bin/bash
> 
> This is the ftpaccess entry:
> despair# grep guestgroup ftpaccess
> guestgroup ftponly user
> despair# groups brian
> user
> 
> with that setup, i ftp in.. log in as brian aand i can still browse directories.

With that setup, "brian" should be able to browse any directory under 
/usr/home.

Other things to check:
Did you set up inetd.conf calling ftpd with the -a switch?  If you don't
start ftpd with -a, it ignores the ftpaccess file.