由 至尊宝 在 05-18-2004 18:09 发表:
如何限制proftpd1.2.9的下载速度
我看了官方文档,老的参数不能用了。
目前是用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.
1<directory></directory>
AllowOverwrite on
A basic anonymous configuration, no upload directories. If you do not
want anonymous users, simply delete this entire
1<anonymous> section.
2
3<anonymous ftp="" home="">
4
5User terry
6
7Group terry
8
9
10
11UserAlias anonymous terry
12
13
14
15MaxClients 6
16
17DisplayLogin welcome.msg
18
19DisplayFirstChdir .message
20
21
22
23# Limit WRITE everywhere in the anonymous chroot
24
25<limit write="">
26
27DenyAll
28
29</limit>
30
31TransferRate APPE,RETR,STOR 3 class terry
32
33DefaultChdir /home/ftp
34
35MaxClientsPerHost 2
36
37
38
39</anonymous>
40
41DefaultChdir /home/ftp
42
43DefaultRoot /home/ftp
44
45
46
47
48* * *
49
50
51_由 至尊宝 在 05-18-2004 18:17 发表:_
52
53
54
55****
56
57
58
59
60
61官方的命令用法。
62
63
64
65Synopsis
66
67
68
69TransferRate [ cmds] [ kilobytes-per-sec[:free-bytes]] [ ["user"|"group"|"class" expression]]
70
71
72
73Examples
74
75
76
77# Limit downloads for everyone except the special group of users TransferRate RETR 1.5 group !special-users
78
79
80
81# 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
82
83
84
85
86* * *
87
88
89_由 至尊宝 在 05-19-2004 06:55 发表:_
90
91
92
93****
94
95
96
97
98
99没人会?
100
101
102
103
104* * *
105
106
107_由 ltkun 在 05-19-2004 07:17 发表:_
108
109
110
111****
112
113
114
115
116
117TransferRate RETR 20 user A</anonymous>