LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 843|回复: 6

如何限制proftpd1.2.9的下载速度

[复制链接]
发表于 2004-5-18 18:09:34 | 显示全部楼层 |阅读模式
我看了官方文档,老的参数不能用了。

目前是用TransferRate来限制。

看看我的配置文件,错在哪里。

ServerName                        "terry's FTP"
ServerType standalone
DefaultServer                        on

Port                                21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

MaxInstances 10

# Set the user and group under which the server will run.
User terry
Group terry

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
<Directory />
  AllowOverwrite                on
</Directory>

# A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous /home/ftp>
User terry
Group terry

UserAlias anonymous terry

MaxClients 6
DisplayLogin welcome.msg
DisplayFirstChdir .message

  # Limit WRITE everywhere in the anonymous chroot
  <Limit WRITE>
    DenyAll
  </Limit>
TransferRate APPE,RETR,STOR 3 class terry
DefaultChdir /home/ftp
MaxClientsPerHost 2

</Anonymous>
DefaultChdir /home/ftp
DefaultRoot /home/ftp
 楼主| 发表于 2004-5-18 18:17:01 | 显示全部楼层
官方的命令用法。

Synopsis

TransferRate [ cmds] [ kilobytes-per-sec[:free-bytes]] [ ["user"|"group"|"class" expression]]

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
 楼主| 发表于 2004-5-19 06:55:57 | 显示全部楼层
没人会?
发表于 2004-5-19 07:17:00 | 显示全部楼层
TransferRate RETR 20 user Anonymous
TransferRate RETR 20 user ftp

你不是说了嘛TransferRate
 楼主| 发表于 2004-5-19 11:48:44 | 显示全部楼层
我是这样用的,但是我自己登陆下载还是x m/s。

再试试看。
发表于 2004-5-19 12:13:38 | 显示全部楼层
TransferRate RETR 20
我限制的是放在全局变量里的
你放到对应用户的环境设置里试过没?
 楼主| 发表于 2004-5-19 16:05:43 | 显示全部楼层
已经可以了,谢谢大家。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表