By default, anonymous FTP is not enabled; the easiest way to enable it, if you choose to do so, is through Sysinstall. Within the Sysinstall program (/usr/sbin/sysinstall), enter the Configure and Networking sections. Scroll to the Anon FTP option and press the spacebar to enter the Anonymous FTP Configuration screen, shown in Figure 27.2. Figure 27.2. Anonymous FTP configuration options.
The default options are generally appropriate for a typical FreeBSD system. The UID, Group, and Comment fields control how the new ftp user will be created. This user's home directory is set to /var/ftp, which is how anonymous FTP worksthe ftp login is treated as a regular user that behaves as if it's listed in /etc/ftpchroot, so anybody logging in as ftp (or its alias, anonymous) will be put into a chroot jail at /var/ftp. You can change any of the fields to suit your system (for instance, if you already have a user with a UID of 14, or if you want a name for the upload directory that's different from incoming). When you select OK at the bottom of the screen, the ftp user will be created, as will the /var/ftp TRee with its necessary subdirectories. Note that Sysinstall doesn't provide the capability to disable anonymous FTP after it has been enabled, but you can do this in a number of ways. The following methods are ranked in descending order of preferability:
Similarly, you can disable the upload (incoming) directory by simply removing it, or else by changing its permissions to 755 (the default directory permissions, in which only the ownerrootcan write into it). Reenable it (or any other directory to which you want anonymous users to be able to upload files) by changing its permissions to 1777for instance, chmod 1777 /var/ftp/incoming. |