LinuxSir.cn,穿越时空的Linuxsir!

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

我的FTP怎么匿名登陆不上?

[复制链接]
发表于 2003-10-23 21:00:52 | 显示全部楼层 |阅读模式
连接到 10.1.216.93:21
220 ProFTPD 1.2.8 Server (TopJoy ProFTPD) [Tagn]
USER anonymous

331 Password required for anonymous.
PASS xxxx
530 Login incorrect.
正在断开与站点 10.1.216.93 的连接


proftp.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                        "TopJoy ProFTPD"
ServerType                         standalone
DefaultServer                        on

# Allow FTP resuming.
# Remember to set to off if you have an incoming ftp for upload.
AllowStoreRestart                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                                ftpusers
Group                        ftp

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~

# Normally, we want files to be overwriteable.
<Directory />
  AllowOverwrite                off
</Directory>

# Needed for NIS.

PersistentPasswd              off

# Default root can be used to put users in a chroot environment.
# As an example if you have a user foo and you want to put foo in /home/foo
# chroot environment you would do this:
#


<Anonymous ~>
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp

# 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
<Limit WRITE>
DenyAll
</Limit>

<Limit LOGIN>
AllowAll
</Limit>

</Anonymous>

其中的
User                                ftpusers
Group                        ftp
是在用户管理里面建的,也修改了/etc/pass文件bash为bni/false
发表于 2003-10-24 02:50:49 | 显示全部楼层
朋友,你先把配置文件恢复到原始状态, 找出不能登陆的原因是不是配置文件的问题.我上次也是出现过不能匿名登陆的问题,后来发先上匿名路径有问题,.
qq:57905122
发表于 2003-10-24 11:26:05 | 显示全部楼层
你用的是什么VSFTP,还是PROFTP?你的匿名项打开了吗?
发表于 2003-10-24 11:44:58 | 显示全部楼层
把这行:
<Anonymous ~>
改为制定一个目录
<Anonymouse /home/ftp>

应该就可以了


我的proftpd.conf文件:
[PHP]
# This is a basic ProFTPD configuration file.
# 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.
# To enable anonymous login remove the ftp user in /etc/ftpusers

ServerName      "Linux proftpd server"
ServerType      standalone
DefaultServer   on
DefaultRoot     ~ ftpusers

ScoreboardFile  /var/run/proftpd.scoreboard
SystemLog       /var/log/proftpd.log

#More log.
#ExtendedLog /var/log/activity-ftp.log read,write

# 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 maximum number of seconds a data connection is allowed
# to "stall" before being aborted.
TimeoutStalled  300

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

# Normally, we want files to be overwriteable.
<Directory /*>
  AllowOverwrite                on
</Directory>

# This is intended to protect you from those nasty DoS cpu burner attacks
<Global>
  DenyFilter \*.*/
</Global>

# A basic anonymous configuration
# To enable this remove the user ftp from /etc/ftpusers
<Anonymous /home/ftp>
  RequireValidShell off
  User                         ftp
  Group                        ftp
  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias                     anonymous ftp

  # Limit the maximum number of anonymous logins
  MaxClients                    50

  # 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
  <Limit WRITE>
    DenyAll
  </Limit>

  # An upload directory that allows storing files but not retrieving
  # or creating directories.
#  <Directory incoming/*>
#    <Limit READ>
#      DenyAll
#    </Limit>
#
#    <Limit STOR>
#      AllowAll
#    </Limit>
#  </Directory>
</Anonymous>
[/PHP]
发表于 2003-10-24 11:47:39 | 显示全部楼层
anonymous 用户在你本地的权限同等于本地用户ftp。
注意/home/ftp目录的权限设置
发表于 2003-10-24 11:51:01 | 显示全部楼层
注意你的配置文件:
User ftpusers
Group ftp
如果没有/etc/passwd 文件里没有ftpusers用户而是ftp用户,需要修改为
User ftp
发表于 2003-10-24 11:55:51 | 显示全部楼层
ftp组和ftp用户为proftpd的默认用户,不便于管理

你的ftp人数不多,可以新建一个用户组来控制用户权限。
只要将:
DefaultRoot   ~
后添加本地用户组名如:
DefaultRoot     ~ ftpusers
ftpusers本地组的所有用户便可登陆到ftp服务器。

做一个大的服务器必须和ldap或是mysql结合使用为佳
 楼主| 发表于 2003-10-24 12:49:33 | 显示全部楼层
我用的Mandrake9.2下自带的Proftp,后来发现如果要允许匿名访问有另外的一个很小的rpm包,装上就可以匿名访问了
谢谢以上各位,我继续学习中。。。
Linux下的FTP不知道有没有GUI的配置,呵呵……
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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