Configuring File Transfer Protocol (FTP) servers

FTP server security

You can use the FTP Server Manager to check on various aspects of FTP server security:

Additionally, if you are setting up a publicly available FTP server, you should consider assigning a dedicated mountable filesystem to the ~ftp/pub/incoming directory. This will protect your system against an attacker who tries to fill your hard disk with large files or many small files (to use up the available inodes). Such an attack could render your system practically unusable until you remove the offending files. It is most convenient to reserve a filesystem for the incoming directory when you install your system or when you add a hard disk (see diskadd(1M)). Alternatively, if the incoming directory is on a ufs or vxfs filesystem, you can set up hard and soft limit quotas for the disk space and number of inodes that the ftp user is allowed (see quota(1M) and related manual pages ).

It is also advisable to set up a regular cron job to purge the directory of old or excessively large files, and to report any possible problems with disk usage (see crontab(1)). For example, the following crontab entries for root check hourly for the existence of files bigger than 10MB, and once per day delete files which have not been modified within the last 30 days:

   0 * * * * ksh -c "find ~ftp/pub/incoming -type f -size +10485760c -exec ls -l {} \; >> /var/adm/log/incoming.log"
   0 0 * * * ksh -c "find ~ftp/pub/incoming -type f -mtime +30 -exec rm -f {} \; 2>&1 > /dev/null"
For more on anonymous FTP security, consult the information available from CERT at the URL: ftp://info.cert.org/pub/tech_tips/anonymous_ftp_config.

You can also obtain information about the known abuses of anonymous FTP at the URL: ftp://info.cert.org/pub/tech_tips/anonymous_ftp_abuses.


© 1999 The Santa Cruz Operation, Inc. All rights reserved.
UnixWare 7 Release 7.1.1 - 5 November 1999