From owner-freebsd-questions@FreeBSD.ORG Sat Feb 14 17:37:55 2004 Return-Path: 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 D898B16A4CF for ; Sat, 14 Feb 2004 17:37:55 -0800 (PST) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FD1943D3F for ; Sat, 14 Feb 2004 17:37:55 -0800 (PST) (envelope-from malcolm.kay@internode.on.net) Received: from beta.home (ppp38-158.lns1.adl1.internode.on.net [150.101.38.158])i1F1bqUK008109; Sun, 15 Feb 2004 12:07:53 +1030 (CST) Content-Type: text/plain; charset="iso-8859-1" From: Malcolm Kay Organization: At home To: "GRF ." , freebsd-questions@freebsd.org Date: Sun, 15 Feb 2004 12:07:52 +1030 User-Agent: KMail/1.4.3 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200402151204.43215.malcolm.kay@internode.on.net> Subject: Re: Allowing Anonymous FTP X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Feb 2004 01:37:56 -0000 On Sun, 15 Feb 2004 08:29, GRF . wrote: > I wanted to see how the anonymous FTP option worked on FreeBSD so I > enabled it on my "test" box. I haven't been able to find out much info > about locking down to a default directory. Is there a way to lets say > block all directories when logging in and open right up to the /incomin= g > directory? It doesn't seem smart to have the /etc directory visible wi= th > the "group" and "passwd" file readable. At the very least is there a w= ay > to make the /bin and /etc directory hidden? Thanks Have you read the ftpd man page? Anonymous ftp with a normal setup does not allow access to the system /et= c directory. On anonymous login to ftp you are effectively chroot'ed to the ftp home directory and can only see or operate on files in the tree down = from=20 that point. From within ftp that home directory (/home/ftp/) appears as=20 the directory /. If you want ftp users to see user and group names from 'ls' rather than numerical identities then you'll need a subdirectory under the ftp home d= irectory called etc and containing a copy of the system /etc/group file and /etc/p= wd.db. The password data base pwd.db does not contain passwords coded or=20 otherwise so this is fairly safe. I guess you could also consider constru= cting special versions of these files for use in /home/ftp/etc containing only = the names you want visible under 'ls' to ftp users. You might also need /home/ftp/bin containing a copy of ls to be called wh= en command ls or dir is given in the ftp client. Malcolm Kay