由 5sky 在 01-18-2004 19:49 发表:
proftpd+mysql+quota的问题
装好后,客户端就是连不上.
>
> 源码:
>
> * * *
>
>
> >
> # cat ftp.syslog
> >
> Jan 18 12:22:11 battle proftpd[396] battle (61.139.64.120[61.139.64.120]): FTP session closed.
> >
> Jan 18 12:23:17 battle proftpd[401] battle: ProFTPD 1.2.8 (stable) (built Fri Jan 16 11:05:30 CST 2004) standalone mode STARTUP
> >
> Jan 18 12:23:41 battle proftpd[402] battle (61.139.64.120[61.139.64.120]): FTP session closed.
> >
> Jan 18 12:24:33 battle proftpd[406] battle (61.139.64.120[61.139.64.120]): FTP session closed.
> >
> Jan 18 13:07:10 battle proftpd[424] battle (221.203.71.16[221.203.71.16]): FTP session closed.
> >
> Jan 18 15:10:45 battle proftpd[469] battle (203.236.81.8[203.236.81.8]): FTP session closed.
> >
>
>
> * * *
>
> 源码:
>
> * * *
>
>
> >
> [root@battle etc]# cat proftpd.conf
> >
> # This is a basic ProFTPD configuration file (rename it to
> >
> # 'proftpd.conf' for actual use. It establishes a single server
> >
> # and a single anonymous login. It assumes that you have a user/group
> >
> # "nobody" and "ftp" for normal operation and anon.
> >
>
> >
> ServerName "ProFTPD Default Installation"
> >
> ServerType standalone
> >
> DefaultServer on
> >
>
> >
> # Port 21 is the standard FTP port.
> >
> Port 21
> >
>
> >
> # 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
> >
>
> >
> # Set the user and group under which the server will run.
> >
> User FTPUSR
> >
> Group FTPGRP
> >
>
> >
> # To cause every FTP user to be "jailed" (chrooted) into their home
> >
> # directory, uncomment this line.
> >
> DefaultRoot ~
> >
>
> >
> #put the proftpd log files in /var/log/ftp.syslog
> >
> SystemLog /var/log/ftp.syslog
> >
>
> >
> #TransferLog log files
> >
> TransferLog /var/log/ftp.transferlog
> >
>
> >
> # 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="">
4> >
5> User ftp
6> >
7> Group ftp
8> >
9>
10> >
11> # We want clients to be able to login with "anonymous" as well as "ftp"
12> >
13> UserAlias anonymous ftp
14> >
15>
16> >
17> # Limit the maximum number of anonymous logins
18> >
19> MaxClients 10
20> >
21>
22> >
23> # We want 'welcome.msg' displayed at login, and '.message' displayed
24> >
25> # in each newly chdired directory.
26> >
27> DisplayLogin welcome.msg
28> >
29> DisplayFirstChdir .message
30> >
31>
32> >
33> # Limit WRITE everywhere in the anonymous chroot
34> >
35> <limit write="">
36> >
37> DenyAll
38> >
39> </limit>
40> >
41> </anonymous>
42> >
43>
44> >
45> <global>
46> >
47>
48> >
49> #设置MySQL认证:
50> >
51> #数据库联接的信息,DatabaseName是数据库名, HostName是主机名,
52> >
53> #Port是端口号,UserName是连接数据库的用户名,Password是密码。
54> >
55> SQLConnectInfo ftp@localhost:3306 FTP 12pps2@
56> >
57>
58> >
59> #数据库认证的类型:
60> >
61> SQLAuthTypes Backend Plaintext
62> >
63>
64> >
65> #指定用来做用户认证的表的有关信息。("FTPUSERS"和"FTPGRPS"是数据表名字)
66> >
67> SQLUserInfo FTPUSERS userid passwd uid gid home shell
68> >
69>
70> >
71> SQLGroupInfo FTPGRPS grpname gid members
72> >
73>
74> >
75> #设置如果shell为空时允许用户登录:
76> >
77> RequireValidShell on
78> >
79>
80> >
81> #数据库的鉴别
82> >
83> SQLAuthenticate users groups usersetfast groupsetfast
84> >
85>
86> >
87> #如果home目录不存在,则系统会为根据它的home项新建一个目录:
88> >
89> SQLHomedirOnDemand on
90> >
91>
92> >
93>
94> >
95>
96> >
97> #磁盘限额部分
98> >
99> QuotaDirectoryTally on
100> >
101>
102> >
103> #磁盘限额单位 b"|"Kb"|"Mb"|"Gb"
104> >
105> QuotaDisplayUnits "Kb"
106> >
107>
108> >
109> QuotaEngine on
110> >
111>
112> >
113> #磁盘限额日志记录
114> >
115> QuotaLog /var/log/Quota.log
116> >
117>
118> >
119> # 打开磁盘限额</global></anonymous>