LinuxSir.cn,穿越时空的Linuxsir!

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

FTP架设好了,可就是连不上,请大哥们帮忙看看是什么问题

[复制链接]
发表于 2007-11-27 23:08:49 | 显示全部楼层 |阅读模式
系统是debian,FTP用的是proftp,设置好了之后,就是登录上到FTP上,提示:
Connection   close  by remote host


查看系统端口,21是被proftp使用的

查看LOG:
proftpd[14587] localhost: ProFTPD killed (signal 15)
proftpd[14587] localhost: ProFTPD 1.3.0 standalone mode SHUTDOWN

不知道是什么原因被KILL
发表于 2007-11-27 23:22:33 | 显示全部楼层
1、启动的时候没有报错么?
2、是不是有selinux权限控制了?
3、还有你启动proftpd的用户是什么?
4、如果以上都没问题那请贴出配置文件和日志的上几行,仅提供两行不足以看出问题。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-28 09:16:13 | 显示全部楼层
启动时没有报错

启动proftpd是ROOT启动的

selinux权限控制在哪里看?

proftpd配置文件:
UseIPv6                         off

ServerName                      "FTP server"
ServerType                      standalone
DeferWelcome                    on

MultilineRFC2228                on
DefaultServer                   on
ShowSymlinks                    on

TimeoutNoTransfer               600
TimeoutStalled                  600
TimeoutIdle                     1200

TransferRate                    RETR 100

DisplayLogin                    welcome.msg
DisplayFirstChdir               .message
ListOptions                     "-l"

DenyFilter                      \*.*/

#MaxHostsPerUser                1
#MaxClientsPerUser              2
MaxClientsPerHost               2

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

# Uncomment this if you would use TLS module:
#TLSEngine                      on

# Uncomment this if you would use quota module:

QuotaEngine                     on
QuotaDirectoryTally             on
QuotaDisplayUnits               Mb
QuotaShowQuotas                 on
QuotaLog                        "/var/log/proftpd/quota.log"

SQLNamedQuery get-quota-limit SELECT "name, quota_type, per_session, limit_type, bytes_in_avail, bytes_out_avail, bytes_xfer_avail, files_in_a
vail, files_out_avail, files_xfer_avail FROM quotalimits WHERE name = '%{0}'AND quota_type = '%{1}'"

SQLNamedQuery get-quota-tally SELECT "name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_x
fer_used FROM quotatallies WHERE name = '%{0}' AND quota_type = '%{1}'"

SQLNamedQuery update-quota-tally UPDATE "bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes
_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHER
E name = '%{6}' AND quota_type = '%{7}'" quotatallies

SQLNamedQuery insert-quota-tally INSERT "%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}" quotatallies

QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally

# Uncomment this if you would use ratio module:
#Ratios                         on

# 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                    100

# Set the user and group that the server normally runs at.
User                            nobody
Group                           nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask                           022  022
#Umask                          133  133
# Normally, we want files to be overwriteable.
AllowOverwrite                  on

AllowRetrieveRestart            on
AllowStoreRestart               on

# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php ... p;ID=LSS-2004-10-02
# It is on by default.
#DelayEngine                    off

# A basic anonymous configuration, no upload directories.

<Anonymous /home/ftp/public>
   User                         ftp
   Group                        nogroup
#   # We want clients to be able to login with "anonymous" as well as "ftp"
   UserAlias                    anonymous ftp
#   # Cosmetic changes, all files belongs to ftp user
   DirFakeUser  on ftp
   DirFakeGroup on ftp
#
   RequireValidShell            off
#
#   # Limit the maximum number of anonymous logins
   MaxClients                   100
#
#   # 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>
#
#   # Uncomment this if you're brave.
#    <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>
#     #          DenyAll
#     #          </Limit>
#               <Limit STOR>
#               Allow
#               </Limit>
#    </Directory>

#
</Anonymous>

DefaultRoot ~ ftp
SyslogLevel emerg
SystemLog /var/log/proftpd/proftpd.log
TransferLog /var/log/proftpd/xferlog

SQLAuthTypes plaintext Crypt
SQLAuthenticate users* groups*
SQLConnectInfo ftpdb@localhost proftpd whosname
SQLUserInfo ftpuser userid passwd uid gid homedir shell
SQLGroupInfo ftpgroup groupname gid members
SQLMinID 500
SQLHomedirOnDemand on
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "count=count+1,accessed=now() where userid='%u'" ftpuser
SQLLog STOR,DELE modified
SQLNamedQuery modified UPDATE "modified=now() where userid='%u'" ftpuser
DeferWelcome on
RootLogin off
RequireValidShell off
回复 支持 反对

使用道具 举报

发表于 2007-11-28 11:02:32 | 显示全部楼层
vsftpd不是很好吗?
回复 支持 反对

使用道具 举报

发表于 2007-11-28 17:26:37 | 显示全部楼层
cat /var/log/proftpd/proftpd.log
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-28 17:47:15 | 显示全部楼层
刚刚试了登录,还是不行,看了一下LOG

Nov 28 17:43:43 hhuni proftpd[28688] localhost (x.x.x.x[x.x.x.x]): FTP session requested from unknown class
Nov 28 17:43:43 hhuni proftpd[28688] localhost (x.x.x.x[x.x.x.x]): FTP session closed.

其中LOCALHOST中的两个IP地址为同一个,是我本机的IP,不是服务器的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-28 17:48:41 | 显示全部楼层
下面昨天晚上调试的LOG


Nov 27 23:55:52 hhuni proftpd[14650] localhost: ProFTPD killed (signal 15)
Nov 27 23:55:52 hhuni proftpd[14650] localhost: ProFTPD 1.3.0 standalone mode SHUTDOWN
Nov 27 23:55:52 hhuni proftpd[14650] localhost: deleting existing scoreboard '/var/run/proftpd/proftpd.scoreboard'
Nov 27 23:57:21 hhuni proftpd[3641] localhost: ProFTPD 1.3.0 (stable) (built mar gen 2 10:57:47 CET 2007) standalone mode STARTUP
Nov 28 00:12:38 hhuni proftpd[3641] localhost: ProFTPD killed (signal 15)
Nov 28 00:12:38 hhuni proftpd[3641] localhost: ProFTPD 1.3.0 standalone mode SHUTDOWN
Nov 28 00:12:38 hhuni proftpd[3641] localhost: deleting existing scoreboard '/var/run/proftpd/proftpd.scoreboard'
Nov 28 00:14:06 hhuni proftpd[3640] localhost: ProFTPD 1.3.0 (stable) (built mar gen 2 10:57:47 CET 2007) standalone mode STARTUP
Nov 28 00:20:58 hhuni proftpd[3640] localhost: ProFTPD killed (signal 15)
Nov 28 00:20:58 hhuni proftpd[3640] localhost: ProFTPD 1.3.0 standalone mode SHUTDOWN
Nov 28 00:20:58 hhuni proftpd[3640] localhost: deleting existing scoreboard '/var/run/proftpd/proftpd.scoreboard'
Nov 28 00:22:29 hhuni proftpd[3640] localhost: ProFTPD 1.3.0 (stable) (built mar gen 2 10:57:47 CET 2007) standalone mode STARTUP
Nov 28 00:26:20 hhuni proftpd[3640] localhost: ProFTPD killed (signal 15)
Nov 28 00:26:20 hhuni proftpd[3640] localhost: ProFTPD 1.3.0 standalone mode SHUTDOWN
Nov 28 00:26:20 hhuni proftpd[3640] localhost: deleting existing scoreboard '/var/run/proftpd/proftpd.scoreboard'
Nov 28 00:27:50 hhuni proftpd[3608] localhost: ProFTPD 1.3.0 (stable) (built mar gen 2 10:57:47 CET 2007) standalone mode STARTUP
回复 支持 反对

使用道具 举报

发表于 2007-11-29 10:34:55 | 显示全部楼层
你是不是用的proftpd+mysql,如果是,请确认你的/etc/etc/proftpd下的modules.conf文件中的"LoadModule mod_sql_postgres.c"一行已经被注释掉,这是debian(或proftpd)的一个bug,我当初也是google了很久才解决的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-11-30 08:51:22 | 显示全部楼层
大哥,非常感谢!终于能访问了!
回复 支持 反对

使用道具 举报

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

本版积分规则

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