mod_ftpd Documentation

Home » Projects » Apache » Mod_ftpd » Docs » mod_ftpd Documentation

Prev: Building and Installation --- Up: TOC --- Next: Configuration Directives

Sample Configuration

A sample Apaceh 2.0 configuration

LoadModule ftpd_module modules/mod_ftpd.so
# Load any of the provider modules here (for user specific chroots)
#LoadModule ftpd_dbm_module modules/mod_ftpd_dbm.so
#LoadModule ftpd_dbi_module modules/mod_ftpd_dbi.so
LoadModule ftpd_default_module modules/mod_ftpd_default.so
#LoadModule ftpd_fail_module modules/mod_ftpd_fail.so

Listen 21
<VirtualHost *:21>
        DocumentRoot /var/ftp
        FtpProtocol On
        FtpShowRealPermissions Off
        FtpAllowActive On
        FtpPasvMinPort 1024
        FtpPasvPaxPort 65535
        FtpLimitOrder default
        FtpDefaultMaxLogins 100
        <Directory /var/ftp>
                AuthUserFile /usr/local/httpd/ftp
                Anonymous_Authoritative On
                AuthAuthoritative Off
                Anonymous_NoUserID Off
                Anonymous_MustGiveEmail Off
                Anonymous_VerifyEmail Off
                Anonymous_LogEmail Off
                Anonymous anonymous
                AuthName ftp
                AuthType Basic
                require valid-user
                order allow,deny
                allow from all
        </Directory>
# only allow changing, retrieving files, and listing on the site
        <Location />
                <LimitExtept CHDIR GET LIST>
                        deny from all
                </LimitExcept>
        </Location>
# allow making directories, listing, chdir, and uploading files.
# But don't allow retrieving files.
        <Location /upload>
                <LimitExcept LIST PUT MKCOL CHDIR>
                        deny from all
                </LimitExcept>
                FtpAllowOverWrite Off
        </Location>
</VirtualHost>