Subject: chroot() function

From: Brian Beaulieu <[email-masked]>
Date: Wed, 2 Oct 1996 19:08:31 -0400 (EDT)

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]
===================================

---

From: Alain Magloire <[email-masked]>
Date: Wed, 2 Oct 1996 19:36:49 -0400 (EDT)

> it.  I did however, try to add to the 'ftpaccess' file but when I logged in,

If you want ftpd to do chroot() for other user than 'ftp'

in /etc/passwd 
user:<passwd>:100:92:Guest Account:/home/ftp/./user:/etc/ftponly

a chroot("/home/ftp") is done plus a chdir("/user")

because of the chroot a valid file system hierarchy must be provide
(lib/*, dev/* etc ... depend on the OS)

I don't know if that's what you want, but
maybe you should take a look at those links. 

<ftp://ftp.fni.com/pub/wu-ftpd/guest-howto>
<http://www.hvu.nl/~koos/wu-ftpd-faq.html>

for more info on how to setup the guestgroup

ftpd.8 is also more than helpfull ;-)

--
cheers, alain

---

From: Cassandra Perkins <[email-masked]>
Date: Wed, 2 Oct 1996 17:55:51 -0700 (PDT)

In your ftpaccess file add:

	guestgroup <valid group name from /etc/group>

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 (/).

----------------------------------------------------------------------------
| Cassandra M. Perkins		     | People usually get what's coming to |
| Network Operations		     | them... unless it's been mailed.    |
| The Loop Internet Switch Co., LLC  |		-fortune		   |
----------------------------------------------------------------------------

---

From: Andrew J <[email-masked]>
Date: Thu, 3 Oct 1996 11:07:14 +1000 (EST)

> ftpd.8 is also more than helpfull ;-)

Don't forget to add /bin/ftponly (or /bin/true whatever you use for the 
ftponly shell) to /etc/shells  it tends to be easy to overlook.  And on 
most systems if you dont have a valid shell, you dont have a login.

--Drew