Normally, ftp installs are performed as an anonymous user. Allowing anonymous ftp is not considered to be a good security practice without taking special precautions.
This article describes the setup of a local FTP server with limited access. Its original purpose was to allow different machines on a local area network to have access to the contents of a CDROM for purposes of installation, upgrading or adding packages.
A user account is created specifically for allowing access from other machines on the local area network using a dedicated user/password account.
Adding a user can be done with sysinstall as shown or by using adduser if desired.
A mount point for the CDROM will need to be created in the lan home directory. The mount point can be any path desired. A typical FreeBSD FTP server mount point is used for this example:
% cd /home/lan
% mkdir -p pub/FreeBSD/releases/i386/4.6-RC2
# mount -t cd9660 -o ro /dev/acd0c /home/lan/pub/FreeBSD/releases/i386/4.6-RC2
An ISO image can be used instead of a CDROM by mounting it using the pseudo-device vn.
The pseudo-device vn is now a kld module and is not necessary to have been compiled into the kernel. If it is not compiled into the kernel, load the module using:
# kldload vn.ko
An ISO image can now be mounted using:
# vnconfig /dev/vn0c /path/to/iso/image # mount -t cd9660 /dev/vn0c /home/lan/pub/FreeBSD/releases/i386/4.6-RC
When it is no longer needed, the ISO image is unmounted using the following:
# umount /dev/vn0c # vnconfig -u /dev/vn0c