Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2002 23:59:58 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Peter Brezny <pbrezny@purplecat.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: a default ftpchroot entry?
Message-ID:  <20020703225958.GC60362@happy-idiot-talk.infracaninophi>
In-Reply-To: <NEBBIGLHNDFEJMMIEGOOEEIMFCAA.pbrezny@purplecat.net>
References:  <NEBBIGLHNDFEJMMIEGOOEEIMFCAA.pbrezny@purplecat.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 03, 2002 at 02:41:54PM -0400, Peter Brezny wrote:
> Is there a way to have a wildcard in the /etc/ftpchroot file in combination
> with an 'exculded' list so that every new user is restricted to their
> directory?

That can be done very readily using lukemftpd, which has been in
4-STABLE for a few weeks now.  Or it's in ports.

Take a look at:

http://www.freebsd.org/cgi/man.cgi?query=ftpchroot&sektion=5&apropos=0&manpath=NetBSD+1.5.2

You could set up an /etc/ftpusers file like this:
---------------------------------------
root
toor
daemon
operator
bin
tty
kmem
games
news
man
bind
uucp
xten
pop
www
nobody
mailnull
smmsp
* allow chroot
---------------------------------------

and a /etc/ftpchroot file like this:

---------------------------------------
*
---------------------------------------

which will deny ftp access by all listed UIDs.  All other UIDs will be
permitted to use FTP but chroot(2)'ed to the users' home directory.

> Or is there a way that I can automate adduser to place them in the ftpchroot
> file automatically?

Write a script that calls adduser(1) and then does edits to the
ftp configuration files?

	Matthew


-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
Tel: +44 1628 476614                                  Marlow
Fax: +44 0870 0522645                                 Bucks., SL7 1TH UK

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020703225958.GC60362>