# Имя FTP сервера, отображается в строке приветствия.
ServerName "my FTP Server"
# Кроме standalone есть возможность запуска сервера через inetd, но standalone удобней.
ServerType standalone
DefaultServer on
ScoreboardFile /var/run/proftpd/proftpd.scoreboard
# Port 21 is the standard FTP port.
Port 21
# Нужно указать доменное имя и ip адрес под которым сервер будет виден снаружи
MasqueradeAddress name.dyndns.org
MasqueradeAddress 10.95.23.xxx
# Нужно указать порты для пассивного соединения которые будут пробрасываться через NAT, желательно что бы портов было >100.
PassivePorts 49152 65534
# Some black magic, for further explanation see ProFTPd options guide
http://www.proftpd.org/docs/directives/linked/by-name.htmlIdentLookups off
UseReverseDNS off
UseIPv6 off
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd).
MaxInstances 30
CommandBufferSize 512
# Set the user and group under which the server will run.
User nobody
Group nobody
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~
# Normally, we want files to be overwriteable.
AllowOverwrite on
# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>
RequireValidShell off
# С помощью этих параметров мы включаем перекодирование имен файлов записанных на локальной файловой системе в кодировке koi8-r в cp1251 для удобного их отображения для windows клиентов.
LangEngine on
UseEncoding KOI8-R CP1251
# Директория - домашняя директория пользователя ftp - в котором будут находиться файлы доступные для скачивания с анонимного FTP сервера
<Anonymous /media/250GB/ftp>
User ftp
Group ftp
<Limit LOGIN>
AllowAll
</Limit>
AnonRequirePassword off
### We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
### Limit the maximum number of anonymous logins
MaxClients 3 "Sorry, max $m users - try again later"
# Limit transfer rate to 60 KB/s, but first 3 MB on full speed.
# TransferRate RETR 60:3145728
### We want 'welcome.msg' displayed at login, and '.message' displayed
### in each newly chdired directory.
# DisplayLogin welcome.msg
# DisplayFirstChdir .message
### Limit WRITE everywhere in the anonymous chroot
<Limit CWD DIRS READ LIST>
AllowAll
</Limit>
<Limit WRITE>
DenyAll
</Limit>
<Directory /media/250GB/ftp/incoming/*>
<Limit READ CWD RETR CWD>
AllowAll
</Limit>
<Limit WRITE>
AllowAll
</Limit>
<Limit DELE>
DenyAll
</Limit>
</Directory>
</Anonymous>