LinuxSir.cn,穿越时空的Linuxsir!

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

哪位高人帮我解决一个关于proftpd的问题啊

[复制链接]
发表于 2003-5-2 16:56:07 | 显示全部楼层 |阅读模式
第一次使用proftpd构建ftp服务器,遇到一个棘手的问题,proftpd已经装好了并以启动,根目录指向/home/ftp,登录可以显示welcome.msg,但是在ftp客户端却无法浏览服务器,就是根本没有文件,头大啊,甚至连/home/ftp/welcome.msg都看不见.拜托各位看看,下面是我的.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 DBfuns FTP"
ServerType                        standalone
DefaultServer                        on

# Some basic defaults
# Port 21 is the standard FTP port.
Port                                21
TimeoutLogin                      120
TimeoutIdle                       180
TimeoutNoTransfer                  180
TimeoutStalled                     240

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

# Set the user and group under which the server will run.
User                                nobody
Group                                nobody



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

RequireValidShell off
DefaultRoot ~/ftp ftp

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

# A basic anonymous configuration, no upload directories.  If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous /home/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 WRITE>
    DenyAll
  </Limit>
</Anonymous>
发表于 2003-5-2 19:59:45 | 显示全部楼层
我觉得问题是DefaultRoot这一行,把它注释掉试试。
 楼主| 发表于 2003-5-2 20:22:41 | 显示全部楼层
搞定了,多谢.但是我想问问为什么DefaultRoot ~/ftp ftp会有问题,它不是将ftp用户锁定在/home/ftp中吗?
发表于 2003-5-3 07:12:53 | 显示全部楼层
DefaultRoot ~/ftp的作用是当并非匿名登录的时候,以此用户的HOME目录下的ftp作为根目录。
发表于 2003-5-3 09:43:26 | 显示全部楼层
更确切的说,DefaultRoot ~/ftp ftp的含义是:当用户ftp登录时,其起始目录为~/ftp,也就是/home/ftp/ftp。
 楼主| 发表于 2003-5-3 11:08:07 | 显示全部楼层
如果不加这句意味着ftp用户(也就是anonymous)不受什么限制?因为我看有的帖子说这句是将ftp用户限制在该目录下.
发表于 2003-5-3 11:33:38 | 显示全部楼层
如果不加,那么用户就会进入FTP的逻辑根目录,也就是~ftp,或在<Anonymous>行指定的目录----在这个设置文件里是/home/ftp。
 楼主| 发表于 2003-5-3 12:01:38 | 显示全部楼层
了解,多谢了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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