LinuxSir.cn,穿越时空的Linuxsir!

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

[求助]proftpd能正常启动,可无法访问!

[复制链接]
发表于 2005-4-15 12:57:30 | 显示全部楼层 |阅读模式
按照 http://linuxsir.cn/forum.php?mod=viewthread&tid=83386 安装和设置的proftpd+mysql,能正常启动
# /etc/init.d/proftpd start
Starting ProFTPD ftp daemon: proftpd.

# ftp
ftp> open 192.168.1.2
Connected to 192.168.1.2.
421 Service not available, remote server has closed connection
ftp> exit

另:我对 tony 那篇文章中的
#插入一条记录
INSERT INTO ftpuser (userid, passwd, uid, gid, homedir, shell) VALUES
('ftpuser', 'ftppasswd', 5501, 5500, '/tony','/sbin/nologin'); //目录/tony应该存在
目录 /tony 是系统根目录 还是 ftp 下的一个目录啊?

请指点,谢了先!
 楼主| 发表于 2005-4-15 19:37:30 | 显示全部楼层

/etc/proftpd.conf

#
# /etc/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
#
ServerName                      "Debian"
ServerType                      standalone
#DeferWelcome                   off

MultilineRFC2228                on
DefaultServer                   on
ShowSymlinks                    on

TimeoutNoTransfer               600
TimeoutStalled                  600
TimeoutIdle                     1200

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

DenyFilter                      \*.*/

# 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:
#Quotas                         on

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

# 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
# Normally, we want files to be overwriteable.
AllowOverwrite                  on

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

# A basic anonymous configuration, no upload directories.

# <Anonymous ~ftp>
#   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                  10
#
#   # 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>
#   #            AllowAll
#   #            </Limit>
#   # </Directory>
#
# </Anonymous>

DefaultRoot ~
SQLAuthTypes Plaintext Crypt
SQLAuthenticate users* groups*
SQLConnectInfo ftpdb@localhost proftpd password
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
回复 支持 反对

使用道具 举报

发表于 2005-4-15 19:42:45 | 显示全部楼层
跟我一样的问题哦,不过我以前都可以访问的,上次重起后就不行了
回复 支持 反对

使用道具 举报

发表于 2005-4-16 09:30:05 | 显示全部楼层
netstat -ln
检查是否有ftp端口打开
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-16 13:14:17 | 显示全部楼层
netstat -ln
Active Internet Connections(only servers)

tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:21  0.0.0.0:*  LISTEN
udp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
回复 支持 反对

使用道具 举报

发表于 2005-4-16 14:40:59 | 显示全部楼层
从上边列表可以看出proftpd已经起来了。建议你先停止proftpd:
/etc/init.d/proftpd stop

然后在控制台实时监控mysql活动:
tail -f /var/log/mysql/mysql.log

之后在其他控制台启动proftpd:
/etc/init.d/proftpd start

从客户端连接ftp,此时查看mysql日志有什么反映。proftpd启动时和ftp client连接时mysql肯定要有相应的与mysql server建立连接、查询用户信息的操作。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-19 12:52:34 | 显示全部楼层
按照 memory 说的做了,怎么我的 /var/log/mysql.log 没有任何反应?mysql.log和mysql.err日志是空的。
回复 支持 反对

使用道具 举报

发表于 2005-4-19 14:55:33 | 显示全部楼层
不是/var/log/mysql.log ,而是/var/log/mysql/mysql.log。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-19 20:17:50 | 显示全部楼层
我用的是Debian Sarge.
apt-get install 方式安装的 apache mysql proftpd 等软件.
/var/log/mysql/目录下根本就没有mysql.log,这个目录下只有 mysql-001.bin等类似命名方式的二进制文件(现在在windows下,不太记得具体的名字)
只在/var/log/下有个 mysql.log
能正常运行 mysql.
回复 支持 反对

使用道具 举报

发表于 2005-4-19 22:59:23 | 显示全部楼层
我用的也是debian。查你的my.cnf文件,其中有:
log             = /var/log/mysql/mysql.log

将所有数据库操作写入log。我在做proftp-mysql配置时就是通过查看mysql日志来调试的,否则你不知到proftpd到底在干什么。
回复 支持 反对

使用道具 举报

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

本版积分规则

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