From owner-freebsd-questions Wed Jul 3 16: 0:11 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 581D637B400 for ; Wed, 3 Jul 2002 16:00:06 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 530F443E09 for ; Wed, 3 Jul 2002 16:00:05 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.4/8.12.4) with ESMTP id g63N03tD061558; Thu, 4 Jul 2002 00:00:03 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.4/8.12.4/Submit) id g63MxwUD061557; Wed, 3 Jul 2002 23:59:58 +0100 (BST) Date: Wed, 3 Jul 2002 23:59:58 +0100 From: Matthew Seaman To: Peter Brezny Cc: freebsd-questions@FreeBSD.ORG Subject: Re: a default ftpchroot entry? Message-ID: <20020703225958.GC60362@happy-idiot-talk.infracaninophi> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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