From owner-freebsd-security Thu Nov 16 21:21: 6 2000 Delivered-To: freebsd-security@freebsd.org Received: from mr2.ipartners.pl (mr2.ipartners.pl [157.25.5.19]) by hub.freebsd.org (Postfix) with ESMTP id 5AB9B37B479 for ; Thu, 16 Nov 2000 21:21:03 -0800 (PST) Received: from weblab.pl ([195.94.193.62]) by mr2.ipartners.pl (8.9.3/8.9.1/MR1.0) with ESMTP id GAA97718; Fri, 17 Nov 2000 06:20:59 +0100 (CET) (envelope-from gorg@weblab.pl) Message-ID: <3A14C238.19C7C60C@weblab.pl> Date: Fri, 17 Nov 2000 06:29:28 +0100 From: Marcin Krasowski X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: pl, en MIME-Version: 1.0 To: Sheldon Jones Cc: freebsd-security@FreeBSD.ORG Subject: Re: chroot and ftpd References: <20001116175348.A76193@hobbydump.com> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Sheldon Jones wrote: > > Does anyone know of a way to have the chroot function in ftpd lock a user into > a sub-directory under their user directory. I would like a way to keep the > users in a sub-directory under their root dir. > > Ncftpd has this feature but I really like the ftpd that comes with freebsd. > In ncftpd you use (u-restrict-mode=subdir-of-homedir userfiles) this will > restrict the user to the sub-derectory userfiles under their account. > > Thank you for your time, > Sheldon Jones > iHighway.net > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-security" in the body of the message Just put the name of the user into the /etc/ftpchroot file (create it if You dont have one). There is a problem with reading usernames while doing ls which comes from the absence of /etc/passwd and /etc/group in chrooted enviroment (I hope You've already guessed how to fix it :) but the rest id fully functional. Gorg PS. Hello to the group. it's my first posting here To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message