ProFTPD 下的五大问题

运维 系统运维
ProFTPD是一个Unix平台上或是类Unix平台(如Linux, FreeBSD等)的FTP服务器程序,它是在自由软件基金会的版权声明下开发、发布免费的软件,也就是说任何只要遵守自由软件基金会版权声明的人,都可以修改源始码。 我们在配置和操作ProFTPD的时候,总会遇到这样或者那样的问题,本文主要讲述了ProFTPD下的五大问题。

       以下是我在平常使用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注入漏洞
责任编辑:zhaolei 来源: 网络转载
相关推荐

2009-11-02 16:48:45

虚拟机管理

2016-06-08 11:44:37

2015-08-04 10:47:52

游戏策划手机游戏

2015-06-02 17:05:53

软件定义数据中心

2015-09-30 10:09:35

2022-08-30 18:13:38

机器学习

2013-02-28 09:50:39

戴尔问题私有化

2013-06-13 09:54:21

虚拟机虚拟机迁移

2009-02-06 13:05:00

服务器存储服务器应用

2013-06-13 10:14:41

虚拟机虚拟机迁移

2023-08-22 15:52:27

数字化转型

2012-07-04 10:27:56

虚拟化

2016-09-12 17:17:06

OpenStack云计算私有云

2010-09-07 13:24:18

CSS

2015-01-28 13:43:39

Android 5.0GoogleLollipop

2011-07-05 11:18:36

虚拟化容量规划

2012-04-09 16:13:21

Android开发者

2009-10-16 16:30:16

GartnerWindows 7问题

2013-05-13 10:27:47

InteropSDNOpenDayligh

2013-09-30 10:13:42

点赞
收藏

51CTO技术栈公众号