LinuxSir.cn,穿越时空的Linuxsir!

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

proftpd 的问题!求救啊

[复制链接]
发表于 2003-6-24 10:17:33 | 显示全部楼层 |阅读模式
这是我的proftpd 的配置文件,现在问题是无法匿名登陆,www用户是空密码是可以自动登陆的。还有就是我现在创建了abc用户,该用户可以ftp到linux上
但是它现在可以访问上级目录,在那添加限制abc用户访问上级目录,在此请高手请教!!


# We want clients to be able to login with "anonymous" as well
as "ftp"
  UserAlias                     anonymous  www

  # 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
# 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                      "Wallace Proftpd Server"
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 that the server normally runs at.
User                            nobody
Group                           nobody

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

# A basic anonymous configuration, no upload directories.
<www /home/www/ftp>

  User                          www
  Group                         www



  # We want clients to be able to login with "anonymous" as well as "ftp"
  UserAlias                     anonymous  www

  # 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-6-24 11:56:57 | 显示全部楼层
你的配置文件proftpd.conf的漏洞可使真不少:
</Anonymous> 怎么没有前面的一部分? 要注意必须是<Anonymous>....</Anonymous> 。这个语法恐怕在HTML就应该是常识了。

开始回答你的问题:
(1)
无法匿名登陆

RH9的PROFTPD匿名登陆的默认用户是 nobody, 默认group 也是nobody. 所以你要写成:

User   nobody
Group  nobody

“UserAlias anonymous www”多此一举,删除。

(2)
限制abc用户访问上级目录

方法很多,我介绍一个方便实用的方法:
我们可以先创建一个group, 目的是使这个group 的用户都被限制不能访问上级子目录。
addgroup ftpuser
adduser -g ftpuser abc
passwd abc

然后,在proftpd.conf 中加入下面一行:

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

本版积分规则

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