ProFTPD 下的五大问题
创始人
2024-07-21 07:51:39
0

       以下是我在平常使用ProFTPD的时候曾经遇到过的问题,写出来一起学习、解答。

  1、我安装proftpd以后,出现了问题,我如何调试?

  通过通过命令! /usr/local/sbin/proftpd -d9 -n启动proftpd来进行调试,则proftp d就会将调试信息打印到consle上以供调试之用。

  2、为什么我的proftpf启动以后,匿名用户不能登录?

  查看proftp配置文件/usr/local/etc/proftpd.conf,修改为(这里/home/ftp可以是任何希望匿名用户登录以后的当前根目录,但是确保要使该目录允许ftp用户访问),并且若部分的User指令指定的用户为ftp用户,则需要在配置文件中添加如下命令指示:

  RequireValidShell off

  3、我如何实现一个正常用户登录以后将其的访问限定在某个目录之下?

  可以通过指令DefaultRoot来实现。例如若希望将ftpusers组的用户限定在自己的home目录下,则需要首先创建该组:

  /usr/sbin/groupadd ftpusers

  然后将用户ideal加入到该组中:

  usrmod -G ftpusers ideal

  最后在在proftpd.conf文件中添加如下内容:

  DefaultRoot ~ ftpusers

  也可以限制用户登录以后仅仅访问自己主目录下的一个子目录:

  Default! Root ~/anoftp ftpusers

  当然也可以将用户限制在其他目录之下,而不是自己的home目录下:

  DefaultRoot /tmp ftpusers

  也可以限定一个用户组的某些用户被限制,而其他不作限制:

  DefaultRoot ~ ftpusers,!empolyee

  这个指令指示仅仅限制ftpusers组中的不是empolyee组的用户进行限制。

  4、我如何使用户登陆时不显示ftp服务器版本信息,以增强安全性?

  在proftpd.conf中添加如下内容:

  ServerIdent off

  则再次登录时,显示如下内容:

  C:WINDOWS>ftp 192.168.2.33

  Connected to 192.168.2.33.

  220 ftpd.test.com.cn FTP server ready.

  User (192.168.2.33:(none)):

  5、在proftpd环境下如何设定虚拟主机?

  可以通过指令:VirtualHost来实现,一个最简单的例子:

  ServerName "virtual FTP server"

  若你仅仅希望通过匿名访问某个虚拟主机,则使用如下! 的指令:

  Serv erName "virtual FTP server"

  DenyAll

  User private

  Group private

  AllowAll

  这样192.168.2.35的这台主机则仅仅允许匿名登录。

  笔者的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 &! quot;test.com.cn FTP 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&! nbsp;limit maximum number of processes per&nb sp;service

  # (such as xinetd)

  MaxInstances 30

  RequireValidShell off

  ServerIdent off

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

  User nobody

  Group nobody

  # Normally, we want files to be overwriteable.

  AllowOverwrite on

  # A basic anonymous configuration, no upload directories.

  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

  DenyAll

  DefaultRoot ~ ftpusers

  ServerName "virtual FTP server"

  DenyAll

  User private

  Group private

  AllowAll

  以上就是我总结的在使用ProFTPD时遇到的五大共性的问题,希望能够对大家有所帮助。

【编辑推荐】

  1. 怎样配置ProFTPD服务器
  2. 如何配置proFTD
  3. 在CentOS系统安装配置proftpd
  4. ProFTPD mod_tls模块CA SSL证书验证漏洞
  5. Linux中建立安全的ProFTPD应用经验谈
  6. ProFTPD STAT命令远程拒绝服务攻击漏洞
  7. ProFTPD字符编码SQL注入漏洞

相关内容

热门资讯

如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
施耐德电气数据中心整体解决方案... 近日,全球能效管理专家施耐德电气正式启动大型体验活动“能效中国行——2012卡车巡展”,作为该活动的...
20个非常棒的扁平设计免费资源 Apple设备的平面图标PSD免费平板UI 平板UI套件24平图标Freen平板UI套件PSD径向平...
德国电信门户网站可实时显示全球... 德国电信周三推出一个门户网站,直观地实时提供其安装在全球各地的传感器网络检测到的网络攻击状况。该网站...
为啥国人偏爱 Mybatis,... 关于 SQL 和 ORM 的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行...
《非诚勿扰》红人闫凤娇被曝厕所... 【51CTO.com 综合消息360安全专家提醒说,“闫凤娇”、“非诚勿扰”已经被黑客盯上成为了“木...
2012年第四季度互联网状况报... [[71653]]  北京时间4月25日消息,据国外媒体报道,全球知名的云平台公司Akamai Te...