##
##  proftpd.conf -- ProFTPD Configuration
##

ServerType            standalone
DefaultServer         off
SocketBindTight       on
Port                  none

MaxInstances          40
User                  @l_nusr@
Group                 @l_ngrp@
Umask                 022 022

UseReverseDNS         off
MultilineRFC2228      on
ShowSymlinks          on
AllowOverwrite        on
MaxLoginAttempts      2
RequireValidShell     yes
ListOptions           "-l"

@l_pam@AuthPAM               on
@l_pam@AuthPAMConfig         proftpd
@l_pam@AuthPAMAuthoritative  off
#PersistentPasswd     off

TimeoutLogin          120
TimeoutNoTransfer     600
TimeoutStalled        600
TimeoutIdle           1200

LogFormat             default "%h %l %u %t \"%r\" %s %b"
LogFormat             auth    "%v [%P] %h %t \"%r\" %s"
LogFormat             write   "%h %l %u %t \"%r\" %s %b"
SystemLog             @l_prefix@/var/proftpd/proftpd.system.log
ScoreboardFile        @l_prefix@/var/proftpd/proftpd.scoreboard

<Global>
    ExtendedLog       @l_prefix@/var/proftpd/proftpd.access.log WRITE,READ write
    ExtendedLog       @l_prefix@/var/proftpd/proftpd.auth.log   AUTH       auth
    TransferLog       @l_prefix@/var/proftpd/proftpd.xfer.log
    IdentLookups      off
    DeferWelcome      off
    DisplayGoAway     @l_prefix@/etc/proftpd/proftpd.msg.goaway
    DisplayLogin      @l_prefix@/etc/proftpd/proftpd.msg.login
    DisplayFirstChdir .message
    DisplayReadme     README*
    WTmpLog           off
</Global>

<Directory /*>
    AllowOverwrite    on
</Directory>

#   sample virtual Anonymous-FTP only server
<VirtualHost 127.0.0.1>
    Port              21
    PassivePorts      49152 65535
    ServerIdent       on "localhost FTP Server (ProFTPD) ready."
    ServerAdmin       root@localhost
    MaxClients        20

    #   allow anonymous logins only
    <Limit LOGIN>
        DenyAll
    </Limit>

    #   Anonymous-FTP
    <Anonymous @l_prefix@/share/proftpd>
        User              @l_nusr@
        Group             @l_ngrp@
        UserAlias         anonymous @l_nusr@
        UserAlias         ftp @l_nusr@
        RootLogin         off
        UseFtpUsers       off
        MaxClients        10 "Sorry, max %m users allowed -- try again later, please."
        RequireValidShell off
        DisplayGoAway     /.msg.goaway
        DisplayLogin      /.msg.login
        <Limit LOGIN>
            AllowAll
        </Limit>
        <Limit WRITE>
            DenyAll
        </Limit>
        <Limit READ DIRS>
            IgnoreHidden on
        </Limit>
        #   optionally allow uploads to a particular directory
        #<Directory incoming/*>
        #    <Limit STOR>
        #        AllowAll
        #    </Limit>
        #    <Limit WRITE DIRS READ>
        #        DenyAll
        #    </Limit>
        #    <Limit CWD XCWD CDUP>
        #        AllowAll
        #    </Limit>
        #</Directory>
    </Anonymous>
</VirtualHost>

