LinuxSir.cn,穿越时空的Linuxsir!

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

我怎么配置都不能让我的ftp服务器能匿名登录?

[复制链接]
发表于 2004-9-3 22:00:35 | 显示全部楼层 |阅读模式
请问怎么配置ftp服务器让别人匿名登录?
还有能不能有谁能把proftp的proftpd.conf传上来让我参考一下.
还有很多问题搞不定.
谢谢啦!!!
发表于 2004-9-3 22:22:15 | 显示全部楼层
每个发行版本都有一个样本吧。
############################匿名用户配置
<Directory /*>
  AllowOverwrite                on
</Directory>
<Anonymous /mnt/ftp>
User                            ftp
#匿名登录使用ftp用户
Group                           ftp
#匿名登录使用ftp组


#/mnt/ftp是ftp的目录,现在已经有了一个anonymous的访问
#我已经建立一个用户pk,想让它的ftp根目录变为/mnt/ftp
#而不是/home/pk,可以下面这样做
#UserAlias      pk ftp

AnonRequirePassword    off
RequireValidShell      off

UserAlias anonymous ftp
#给ftp用户anonymous的别名,使得anonymous登录就是ftp用户登录。
MaxClients 10
#最多10个匿名用户同时在线
#限制每个匿名用户IP允许的线程数
MaxClientsPerHost 1 "Sorry, anonymous user only allow one IP -- try again later!"
DisplayLogin welcome.msg
#登录FTP显示的欢迎信息。放在FTP的根目录下。
DisplayFirstChdir .message
<Limit WRITE>
DenyAll
</Limit>
</Anonymous>
#限制匿名用户写权限
###########################匿名用户配置完
 楼主| 发表于 2004-9-4 15:13:54 | 显示全部楼层
我用的就是proftp中的那个样本啊。可是就是连不上
 楼主| 发表于 2004-9-5 00:43:38 | 显示全部楼层
如下是我的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                      "roFTPD 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                            zdftp
Group                           zdftp
                                                                                                                                               
# These must be absolute paths.
AuthUserFile                    /tmp/passwd
AuthGroupFile                   /tmp/group
                                                                                                                                               
#PidFile                         /tmp/PFTEST/PFTEST.pid
ScoreboardFile                  /tmp/PFTEST/PFTEST.score
SystemLog                       /tmp/PFTEST/PFTEST.syslog
TransferLog                     /tmp/PFTEST/PFTEST.xferlog
                                                                                                                                               
# 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 /storage>
  AllowOverwrite                on
</Directory>
                                                                                                                                               
<Directory />
<Directory />
<Limit READ WRITE>
DenyAll
</Limit>
</Directory>
                                                                                                                                               
# A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous ~ftp>
  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 LOGIN>
   AllowAll
  </Limit>
  <Limit WRITE>
    DenyAll
  </Limit>
</Anonymous>


我用匿名连接的时候会出险如下的错误:
连接到 10.171.35.105:21
220 ProFTPD 1.2.9 Server (ProFTPD Default Installation) [localhost.localdomain]
USER anonymous

331 Anonymous login ok, send your complete email address as your password.
PASS xxxx
530-Unable to set anonymous privileges.
530 Login incorrect.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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