http://www.proftpd.org/docs/directives/ ... rRate.html
тут написано
TransferRate
Name
TransferRate -- Configure upload, download transfer rates
Synopsis
TransferRate [ cmds] [ kilobytes-per-sec[:free-bytes]] [ ["user"|"group"|"class" expression]]
Default
None
Context
server config, <VirtualHost>, <Global>, <Anonymous>, <Directory>, .ftpaccess
Module
mod_xfer
Compatibility
1.2.8rc1 and later
Description
The TransferRate directive is used to set transfer rates limits on the transfer of data. This directive allows for transfer rates to be set in a wide variety of contexts, on a per-command basis, and for certain subsets of users. Note that this limit only applies to a single connection, and not to the overall transfer rate of the server.
The cmds parameter may be an comma-separated list of any of the following commands: APPE, RETR, STOR, and STOU.
The kilobytes-per-sec parameter is the actual transfer rate to be applied.
The free-bytes parameter, if configured, allows that many bytes to be transferred before the rate controls are applied. This allows for clients transferring small files to be unthrottled, but for larger files, such as MP3s and ISO images, to be throttled.
The optional parameters are used to restrict the application of the rate controls only to specific users. If the "user" restriction is given, then expression is a user-expression specifying to which users the rate applies. Similarly for the "group" restriction. For the "class" restriction, the expression is simply the name of connection class for whom the rate will apply.
Examples
# Limit downloads for everyone except the special group of users TransferRate RETR 1.5 group !special-users
# Limit uploads (and appends!) to the prolific users in the # lotsofuploadfiles.net domain. This presumes that a Class has been defined # for that domain, and that that Class has been named "uploaders". Let them # upload small files without throttling, though. TransferRate APPE,STOR 8.0:1024 class uploaders
TransferRate RETR,STOR,APPE 20
добавил - не работает! пробовал по разному тоже самое
кто как делал?
вот конфиг
все остальное работает!
Код: Выделить всё
# ?????? proftpd - 2006-02-19
#TCPServiceName my
#TCPAccessFiles /etc/host.allow /etc/my.deny
# ??? ??????? - ???????????? ????????????? ????????
ServerName "Main FTP servant :)"
#ServerName thedj.org.ua
# ??? ??????? (???? ?? ??? ?????? ???????, ? ??? ??? ???????,
# standalone/inetd - ??? ??? ????? inetd)
ServerType standalone
DefaultTransferMode binary
#ServerType inetd
# ????? ????????? ????????? ?????: ???? ?????? ??????????? ?? ?? ???
# ? ?? IP ??? ?? ??????????? ????, ?? ????????? ? ???????, ?? ???
# ????????? ? `off` ?? ??????? ?????, ???? ?? ??????????? `on` ??
# ?? ????? ???????? `???????? ??-?????????`
#DefaultServer off
DefaultServer on
# e-mail ?????????????? (?? ???? ??? ??????? ???????????? ??? ?????
# ????????? ?????? - ?? ? ????? ???? ?????? ??? ?????????? ?
# ???????????? ???????)
ServerAdmin rtyug@ukr.net
# ????? ??? ???????? ???? ? ???????
ScoreboardFile /var/run/proftpd.scoreboard
AllowFilter ^[-A-Za-z0-9_\.(),/]*$ # ?? ?????? ?????? ;)
AllowForeignAddress off # ????????? ????????? ??????-??????
# ???? ?? ??????? ???????? ??????
PassivePorts 49151 65535
Port 21
#PassivePorts 1024 65535
AllowOverride off # ????????? ????????????? .ftpaccess
MaxClientsPerHost 2
MaxClients 20
#MaxClientsPerUser
#MaxConnectionRate 50000
#TCPAccessFiles /etc/hostsftp
# ????? ? ??????? ????????? ????? ????? (?? ?????? ????? - ????? ??????????
# ?? ????? ????????, ????? ??? ????????? ?? 777 - ?.?. ? ????? ?????? ?????????
# ????? 755)
Umask 027
# tcpReceiveWindow ???? (32192)
# tcpSendWindow ???? (32192)
#RequireValidShell no # ?? ????, ??????? ?????? ? ftp, ????? shell
# ???????????? ????? `?????` (???????? ?????? ? standalohe ??????)
# ?????????? ??? ?????? ?? ???? ???? `????? ? ????????????` ?? ?
# ?? ?????????? ??????? ??????? :)
MaxInstances 50
# ???? ?? ???????? ???????? ??????
User ftp
# ??????, ??? ??????? ???????? ??????
Group ftp
# ??? ??????????? (?? ????? ???? - ? ????? ???? ????????
# ?????? ? ?? - ? ?????? ?????? - ???????? ???????)
SQLAuthTypes Plaintext
# ???? ? ??? ??????????????? - on - ???? ? ??? :)
# ?? - ???? ????????? `on` ?? ?? ??????? ? ?? ?? ????????.
# ??? ?????? ???????. ?????? ???????? `users`
SQLAuthenticate users
# ???? ??? ?????????? ? MySQL ????????:
# ???_????_??????@????_???_MySQL:???? ???_???????????? ??????
SQLConnectInfo ftp@localhost:3306 ftp пароль
# ? ????? ??????? ?????? ???? ?????? - ?????? ????, ???
# ??? ???????, ??? ????? ????????????
SQLUserInfo `users_table` `username` `password` `uid` `gid` \
`homedir` `shell`
# ?????? ?? ???? ? ????? (??? ????, ????? ?? ??? ???????????),
# `????????` shell ????????? ? /etc/shells
RequireValidShell off
# ??? ???? ?????? ? SQL
SQLLogFile /var/log/proftpd.log
# ??? ??? ??? ?????? ???????? ? ??????? ????? ?? ??? ?
# ?? MySQL ?????? ??????????? ?? ?????? ??????? :)
# ?????????? ??????? ?????? ? ??. ????? ????? ????? - ???????
# ?????????? ?????, ? ????????? ??? ?? ?????? ?????????
SQLLog PASS counter_login
SQLNamedQuery counter_login UPDATE "`last_login`=UNIX_TIMESTAMP(), \
`login_count`=`login_count`+1 WHERE \
`username`='%u'" `users_table`
# ????? ????????? ?????? ? ??
SQLLog ERR_PASS counter_err
SQLNamedQuery counter_err UPDATE "`last_err_login`=UNIX_TIMESTAMP(), \
`err_login_count`=`err_login_count`+1 WHERE \
`username`='%U'" `users_table`
# ???????? ??? ????????? ? ?????? ? ???????:
# ??????????
# %u - ??? ???????????? (? ??????? ???????????)
# %f - ?????? ???? ? ??? ????? ??????? ??? ??????
# %b - ????? ????, ??????? ???? ???????
# %h - ??? ??????? (?? DNS), ???? ?? ??????? ????????? - IP
# %a - IP-????? ???????
# %m - ??? ??????? ?????????? ?? ??????? (RETR/STOR)
# %T - ????? (??????) ??????? ?? ???????? ????? ???????
SQLLog RETR,STOR log_story_transfer
SQLNamedQuery log_story_transfer INSERT "'',\
UNIX_TIMESTAMP(),'%u',\
'%f', '%b', '%h', \
'%a', '%m', '%T'" \
`xfer_table`
# ?????????? ?????? ??? ?????????? ? ?????? ??????
# (? ???? ?????? ?? ?????? - ?? ???????? ? ? ????? ???? :))
SQLLOG ERR_RETR,ERR_STOR,ERR_DELE,ERR_RMD,ERR_RNTO\
log_err_modify
SQLNamedQuery log_err_modify INSERT "'',\
UNIX_TIMESTAMP(),\
'%u', '%f', '%h', \
'%a', '%m'" `xfer_errors`
# ???? ??????? ????????, ???? ???????? ??? ???????????
# (? ?????? ???????????? ???????? `????????????` ?? 10-20 ??????)
# ?? ???????????????? ????????? ??? ??????
##
UseReverseDNS off
##
IdentLookups off
#UseReverseDNS on
##
#IdentLookups on
#HideNoAccess on
# HideUser uid
#IgnoreHidden on
# MaxClients 15 "??????? ????? ?????????? ? ????????"
# MaxClientsPerHost 4 "%m ??????? ??? ?????????? ? ?????? ?????, ?????? ?? ?????????"
# MaxLoginAttempts 3 "??????? ????? ??????? ?????"
#???????? ?????????? ? ????? ip ?????????? ????????? ??? ?????????
#UseHostsAllowFile /etc/proftpd.allow
#UseHostsDenyFile /etc/proftpd.deny
#PersistentPasswd on | off
# Bind IP-????? (??????? ???????? - ???????? ??????, VirtualHost)
#Bind thedj.org.ua
## DefaultAddress IP-????? (??????? ???????? - ???????? ??????)
DefaultAddress 193.201.81.18
#TransferRate 5 ftp !root
# ???? ???? ????? ??? ???????????? ?? ftp ???? ???????????
# ????? ???????? ???????????, ?? ???? ?????????????????
# ????????? ??????:
DefaultRoot ~
# ? ???? ?????? ??????? - ???? ? ???????? ???????? ?? ????? ???????
# ? ????????? ??`chroot`??. ????, ????????, ???? ????? ????????????
# ????? ?? ??????? ???????? ? ?????????? ???, ?? ???? ??????? !users
# ????? ????? ??????? ???????????? ??????.
#DefaultRoot ~ !lissyara
PersistentPasswd off # (??????? ?? ????????? ????? /etc/passwd ? /etc/group ?? ????? ?????? proftpd, ??????? chroot)
#56780c
MaxLoginAttempts 2
# ??????????
<Directory ~>
#RequireValidShell off
#TransferRate RETR 1.5
#TransferRate APPE,STOR 8.0
#TransferRate RETR,STOR,APPE 20
TransferRate RETR,STOR 100 ~
AllowOverwrite on
AllowOverride off
<Limit Write>
#TransferRate RETR 5
#TransferRate STOR 5
AllowAll
</Limit>
<Limit READ>
#TransferRate RETR 5
#TransferRate STOR 5
AllowAll
</Limit>
</Directory>