Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2004 12:07:52 +1030
From:      Malcolm Kay <malcolm.kay@internode.on.net>
To:        "GRF ." <nuckingfutsto@hotmail.com>, freebsd-questions@freebsd.org
Subject:   Re: Allowing Anonymous FTP
Message-ID:  <200402151204.43215.malcolm.kay@internode.on.net>
In-Reply-To: <Law11-F101ud4vZl6WJ000176f0@hotmail.com>
References:  <Law11-F101ud4vZl6WJ000176f0@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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