proftpd+mysql+quota的问题

由 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&gt;     &gt; 
  3&gt;     <anonymous ~ftp="">  
  4&gt;     &gt; 
  5&gt;       User                          ftp  
  6&gt;     &gt; 
  7&gt;       Group                         ftp  
  8&gt;     &gt; 
  9&gt;       
 10&gt;     &gt; 
 11&gt;       # We want clients to be able to login with "anonymous" as well as "ftp"  
 12&gt;     &gt; 
 13&gt;       UserAlias                     anonymous ftp  
 14&gt;     &gt; 
 15&gt;       
 16&gt;     &gt; 
 17&gt;       # Limit the maximum number of anonymous logins  
 18&gt;     &gt; 
 19&gt;       MaxClients                    10  
 20&gt;     &gt; 
 21&gt;       
 22&gt;     &gt; 
 23&gt;       # We want 'welcome.msg' displayed at login, and '.message' displayed  
 24&gt;     &gt; 
 25&gt;       # in each newly chdired directory.  
 26&gt;     &gt; 
 27&gt;       DisplayLogin                  welcome.msg  
 28&gt;     &gt; 
 29&gt;       DisplayFirstChdir             .message  
 30&gt;     &gt; 
 31&gt;       
 32&gt;     &gt; 
 33&gt;       # Limit WRITE everywhere in the anonymous chroot  
 34&gt;     &gt; 
 35&gt;       <limit write="">  
 36&gt;     &gt; 
 37&gt;         DenyAll  
 38&gt;     &gt; 
 39&gt;       </limit>  
 40&gt;     &gt; 
 41&gt;     </anonymous>  
 42&gt;     &gt; 
 43&gt;       
 44&gt;     &gt; 
 45&gt;     <global>  
 46&gt;     &gt; 
 47&gt;       
 48&gt;     &gt; 
 49&gt;     #设置MySQL认证:  
 50&gt;     &gt; 
 51&gt;     #数据库联接的信息,DatabaseName是数据库名, HostName是主机名,  
 52&gt;     &gt; 
 53&gt;     #Port是端口号,UserName是连接数据库的用户名,Password是密码。  
 54&gt;     &gt; 
 55&gt;     SQLConnectInfo ftp@localhost:3306 FTP 12pps2@  
 56&gt;     &gt; 
 57&gt;       
 58&gt;     &gt; 
 59&gt;     #数据库认证的类型:  
 60&gt;     &gt; 
 61&gt;     SQLAuthTypes Backend Plaintext  
 62&gt;     &gt; 
 63&gt;       
 64&gt;     &gt; 
 65&gt;     #指定用来做用户认证的表的有关信息。("FTPUSERS"和"FTPGRPS"是数据表名字)  
 66&gt;     &gt; 
 67&gt;     SQLUserInfo FTPUSERS userid passwd uid gid home shell  
 68&gt;     &gt; 
 69&gt;       
 70&gt;     &gt; 
 71&gt;     SQLGroupInfo FTPGRPS grpname gid members  
 72&gt;     &gt; 
 73&gt;       
 74&gt;     &gt; 
 75&gt;     #设置如果shell为空时允许用户登录:  
 76&gt;     &gt; 
 77&gt;     RequireValidShell on  
 78&gt;     &gt; 
 79&gt;       
 80&gt;     &gt; 
 81&gt;     #数据库的鉴别  
 82&gt;     &gt; 
 83&gt;     SQLAuthenticate users groups usersetfast groupsetfast  
 84&gt;     &gt; 
 85&gt;       
 86&gt;     &gt; 
 87&gt;     #如果home目录不存在,则系统会为根据它的home项新建一个目录:  
 88&gt;     &gt; 
 89&gt;     SQLHomedirOnDemand on  
 90&gt;     &gt; 
 91&gt;       
 92&gt;     &gt; 
 93&gt;       
 94&gt;     &gt; 
 95&gt;       
 96&gt;     &gt; 
 97&gt;     #磁盘限额部分  
 98&gt;     &gt; 
 99&gt;     QuotaDirectoryTally on  
100&gt;     &gt; 
101&gt;       
102&gt;     &gt; 
103&gt;     #磁盘限额单位 b"|"Kb"|"Mb"|"Gb"  
104&gt;     &gt; 
105&gt;     QuotaDisplayUnits "Kb"  
106&gt;     &gt; 
107&gt;       
108&gt;     &gt; 
109&gt;     QuotaEngine on  
110&gt;     &gt; 
111&gt;       
112&gt;     &gt; 
113&gt;     #磁盘限额日志记录  
114&gt;     &gt; 
115&gt;     QuotaLog /var/log/Quota.log  
116&gt;     &gt; 
117&gt;       
118&gt;     &gt; 
119&gt;     # 打开磁盘限额</global></anonymous>
Published At
Categories with 服务器类
Tagged with
comments powered by Disqus