LinuxSir.cn,穿越时空的Linuxsir!

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

proftpd问题,请大虾帮忙看看

[复制链接]
发表于 2003-3-1 05:40:37 | 显示全部楼层 |阅读模式
用proftpd做的ftp服务器,每次连接前基本要经过20几秒的时间才能连上,我的同学都以为服务器没开,太ft了!我的proftpd.conf文件如下:
ServerName                      "Debian"
ServerType                      inetd
DeferWelcome                    off
UseReverseDNS                   off # Enhance connection speed
#ServerIdent                    off

MultilineRFC2228                on
DefaultServer                   on
ShowSymlinks                    on
AllowOverwrite                  on

TimeoutNoTransfer               600
TimeoutStalled                  600
TimeoutIdle                     1200

#AuthUserFile                   /root/system_etc/ftpd.passwd
DisplayLogin                    welcome.msg
DisplayFirstChdir               .message
DisplayConnect                  /home/ftp/login.msg
LsDefaultOptions                "-l"

DenyFilter                      \*.*/

# Uncomment this if you are using NIS or LDAP to retrieve passwords:
#PersistentPasswd               off

# Port 21 is the standard FTP port.
Port                            21

# 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 that the server normally runs at.
User                            nobody
Group                           nogroup
<Directory /*>
  # Umask 022 is a good standard umask to prevent new files and dirs
  # (second parm) from being group and world writable.
  Umask                         022  022

  AllowRetrieveRestart          on
  AllowOverwrite                on
  AllowStoreRestart             on
</Directory>

# A basic anonymous configuration, no upload directories.

# These lines are marked with ##proftpd.deb anon access## so that they
# can be recognized, and edited by postinst.  You can remove them once
# you're sure you don't want to keep them around.

<Anonymous ~ftp>
  AnonRequirePassword           on
  User                          ftp
  Group                         nogroup
UserAlias                     pub ftp

  RequireValidShell             off

  # Limit the maximum number of anonymous logins
  MaxClients                    10      "Sorry, max %m users -- try again later"
  MaxClientsPerHost             2       "Sorry, only 2 connections per ip"
  RateReadBPS                   500000
  RateWriteBPS                  750000

  # We want 'welcome.msg' displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin                  welcome.msg
  DisplayFirstChdir             .message

  # Limit WRITE everywhere in the anonymous chroot
  <Directory *>
    <Limit WRITE>
      DenyAll
    </Limit>
  </Directory>
<Directory incoming>
     # Umask 022 is a good standard umask to prevent new files and dirs
     # (second parm) from being group and world writable.
     Umask                              022  022
              <Limit READ WRITE MKD>
              DenyAll
              </Limit>
              <Limit STOR>
              AllowAll
              </Limit>
   </Directory>
   <Directory kepan>
   DisplayFirstChdir  info
        <Limit  WRITE CWD>
        Allow   from 166.111.
        </Limit>
        <Limit READ RMD DELE >
         DenyAll
        </Limit>
   </Directory>

</Anonymous>
发表于 2003-3-3 06:09:43 | 显示全部楼层
跟你的ftp配置没关系。
是域名逆向解析的问题,修改一个文件就成了。
vi /etc/resolv.conf
删掉关于dns的设置试试

以上
siyeclover
发表于 2003-3-4 17:38:30 | 显示全部楼层
问题出在"ServerType inetd"这一行.
这一行告诉ProFTPd通过inetd启动.你可以安装proftpd-standalone rpm包,然后把上面那行该为"ServerType standalone".用service proftpd start启动,应该可以解决你的问题.
我就是这么设置的,P75+112M机器,能在小于1秒的时间内连接上.
发表于 2003-3-4 17:41:47 | 显示全部楼层
楼上的,晕死.
跟那个没关系,既可以用inetd模式,也可以用standalone.
能够连接上,就说明模式没错,proftpd已经正常启动.

以上
siyeclover
发表于 2003-3-4 17:50:02 | 显示全部楼层
嘿,你说话还真有趣. :-)
我没说模式错了呀.用standalone肯定比inetd要快一些,就是要长期占用资源.
而且,我也不人为这个问题与/etc/resolv.conf有什么关系.
发表于 2003-4-1 11:30:06 | 显示全部楼层
哈哈,确实是反向解析的问题,大家不要争了
发表于 2003-4-1 22:48:54 | 显示全部楼层
跟反向解析有什么关系,能说得详细一点吗?
发表于 2003-4-2 08:41:09 | 显示全部楼层
问:为什么从windows 向linux服务器telnet/ftp 都特别慢?有时需等
       两分钟左右才能出来,出来后一切正常。
   答:1. 这是Linux需要反向解析域名的缘故,当他监听到某个IP地址需要
       请求telnet/ftp服务时,它反向检查是否该IP地址有对应的域,解决
       方法是:在/etc/hosts中加入需要连接进来的windows客户机的IP地址,
       或者加入到DNS。
       2.删除你的/etc/resolv.conf文件,然后/etc/rc.d/init.d/network restart

然后搞定
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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