由 longdas 在 07-09-2003 11:00 发表:
proftpd , 希望配置三个用户。有不同的权限,怎么配?
例如我有:
/home/ftp_root
---------------incoming
有帐号
download
upload
vip
其中要求vip统管整个ftp_root,不限制任何条件。
download, 可以在ftp_root中下载任何文件,限速为1000K,进程数2个。同时可以在incoming文件中上传,速度为 2000K
upload,只能登录incoming,只能上传、下载incoming中东西,也限速。不过不能删除已经传过的东西。
redhat 7.3/8.0/9/0
HP lh 6000 server
Dell 2650 Server
由 longdas 在 07-09-2003 11:02 发表:
在 proftpd.conf中这样??
1<vip ftp_root="" home=""></vip>
.......
redhat 7.3/8.0/9/0
HP lh 6000 server
Dell 2650 Server
由 longdas 在 07-09-2003 14:35 发表:
up
redhat 7.3/8.0/9/0
HP lh 6000 server
Dell 2650 Server
由 vion800 在 07-10-2003 00:18 发表:
我帮你顶一下
这个问题我问了2次,也帮人顶了2次
由 quanliking 在 07-10-2003 00:49 发表:
偶正在写个简单的,写好贴出来。
There are two distinct opinions:
One would say, "The love of money is the root of all evil."
The other, "The lack of money is the root of all evil."
Which one i should take, that is the question.
由 dreamspsx 在 07-10-2003 09:05 发表:
好问题!希望解答! 谢谢
由 longdas 在 07-10-2003 09:13 发表:
> quote:
>
> * * *
>
> 最初由 quanliking 发表
>
> 偶正在写个简单的,写好贴出来。
>
> * * *
就等你了。。
redhat 7.3/8.0/9/0
HP lh 6000 server
Dell 2650 Server
由 longdas 在 07-10-2003 16:03 发表:
顶
redhat 7.3/8.0/9/0
HP lh 6000 server
Dell 2650 Server
由 hgkrt 在 07-10-2003 22:26 发表:
老大,你啥网络呀.限速1000k/2000k???
可怕...
欢迎访问我的个人主页!!!
主机:
网上空间:
http://www.paw.hi-ho.ne.jp/hgkrt
由 quanliking 在 07-10-2003 23:45 发表:
花了点时间好好研究了一下,总算写好,自己感觉好行,不过还很粗糙,兄弟自己多测试了。
平台 : Debian
版本 : Proftpd 1.2.8
系统中默认已经有 用户/组 :nobody/nogroup
为了方便管理,我加了一个 ftp 组 : ftp-users
添加了4个用户:ftp ano-ftp down up
$ addgroup --gid 666 ftp-users
$ useradd -g ftp-users -d /home/ftp -s /bin/false ftp
$ useradd -g ftp-users -d /home/ftp -s /bin/false ano-ftp
$ useradd -g ftp-users -d /home/ftp -s /bin/false down
$ useradd -g ftp-users -d /home/ftp/incoming -s /bin/false up
$ chown -R ftp:ftp-users /home/ftp
$ chmod 770 /home/ftp
$ chmod 770 /home/ftp/incoming
$ chmod 740 /home/ftp/welcome.msg
There are two distinct opinions:
One would say, "The love of money is the root of all evil."
The other, "The lack of money is the root of all evil."
Which one i should take, that is the question.
由 quanliking 在 07-10-2003 23:48 发表:
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Proftpd 1.2.8 configure
[email protected]
irc server: 211.92.88.40
channel: linuxfire
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ServerName "Superman's FTP Server"
ServerAdmin [email protected] rs
ServerType standalone
ServerIdent on "FTP Server ready."
DeferWelcome off
ShowSymlinks on
MultilineRFC2228 on
DefaultServer on
IdentLookups off
UseReverseDNS off
Port 21
TimesGMT off
MaxInstances 30
MaxLoginAttempts 3
TimeoutLogin 30
TimeoutNoTransfer 400
TimeoutIdle 1200
TimeoutStalled 600
DisplayLogin welcome.msg
DisplayFirstChdir .message
ListOptions "-l"
DenyFilter \./
User nobody
Group nogroup
DefaultRoot ~
DefaultTransferMode binary
AllowForeignAddress on
DeleteAbortedStores off
1<directory *="">
2
3Umask 022 022
4
5AllowRetrieveRestart on
6
7AllowOverwrite on
8
9AllowStoreRestart on
10
11AllowOverwrite on
12
13</directory>
TransferRate RETR 500
TransferRate STOR 1000
TransferRate STOU 1000
TransferRate APPE 1000
1<global>
2<limit login="">
3
4DenyGroup !ftp-users
5
6</limit>
7
8
9
10MaxClients 30 "550 客满 (上限=%m)"
11
12MaxClientsPerHost 5 "551 每个 IP 5 线程"
13
14PassivePorts 2000 3000
15
16
17
18AccessGrantMsg ":) Welcome! 我的朋友"
19
20AccessDenyMsg ":( 再试试看"
21
22AllowOverwrite on
23
24RootLogin off
25
26
27
28</global>
1<anonymous ~ftp="">
2
3User ano-ftp
4
5Group ftp-users
6
7UserAlias anonymous ano-ftp
8
9
10
11AccessGrantMsg ":) 注意哟!你现在是 anonymous 用户"
12
13AccessDenyMsg ":( 失败了!再试试看"
14
15
16
17AuthAliasOnly on
18
19AnonRequirePassword off
20
21RequireValidShell off
22
23
24
25<directory *="">
26<limit read="" write="">
27
28DenyAll
29
30</limit>
31</directory>
32</anonymous>
1<anonymous ~ftp="">
2
3User ftp
4
5Group ftp-users
6
7
8
9UserAlias vip ftp
10
11
12
13# 这里我为了避免使用系统用户密码(/etc/shadow),而额外才用了 ftp 目录密码。
14
15#
16
17# 加密密码生成脚本:
18
19# $ perl -e 'print("userPassword: ".crypt("1234","ftp")."\n");'
20
21# 结果 : userPassword: ftZLqAw418zis
22
23#
24
25# 此例中用户 ftp ,密码 1234. 请自行修改。
26
27
28
29AnonRequirePassword on
30
31UserPassword ftp ftZLqAw418zis
32
33
34
35AccessGrantMsg ":) 注意哟!你现在是 vip 用户身份"
36
37AccessDenyMsg ":( 失败了!再试试看"
38
39
40
41RequireValidShell off
42
43
44
45<directory ~ftp="">
46
47GroupOwner ftp-users
48
49UserOwner ftp
50
51AllowOverwrite on
52
53AllowRetrieveRestart on
54
55AllowStoreRestart on
56
57umask 022 022
58
59<limit *="">
60
61AllowAll
62
63</limit>
64</directory>
65</anonymous>
1<anonymous ~ftp="">
2
3User down
4
5Group ftp-users
6
7UserAlias download down
8
9
10
11AccessGrantMsg ":) 注意你现在是 download 用户身份"
12
13AccessDenyMsg ":( 失败了!再试试看"
14
15
16
17# perl -e 'print("userPassword: ".crypt("1234","down")."\n");'
18
19AnonRequirePassword on
20
21UserPassword down do6IgaFfc0i8c
22
23
24
25RequireValidShell off
26
27
28
29MaxClientsPerHost 2 "551 每个 IP 2 线程"
30
31
32
33<directory ~ftp="">
34
35GroupOwner ftp-users
36
37UserOwner down
38
39<limit write="">
40
41DenyAll
42
43</limit>
44<limit cwd="" read="" xcwd="">
45
46AllowAll
47
48</limit>
49</directory>
50<directory incoming="" ~ftp="">
51
52GroupOwner ftp-users
53
54UserOwner down
55
56AllowOverwrite off
57
58AllowRetrieveRestart on
59
60AllowStoreRestart on
61
62umask 002 002
63
64<limit cwd="" mkd="" read="" stor="" xcwd="" xmkd="">
65
66AllowAll
67
68</limit>
69
70</Di</directory></anonymous>