dota2新天梯加分机制:ProFTPD 下的五大问题

来源:百度文库 编辑:偶看新闻 时间:2024/04/28 01:01:13

ProFTPD 下的五大问题

2011-02-22 09:34 佚名 网络转载 我要评论(0) 字号:T | T

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

AD:

以下是我在平常使用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时遇到的五大共性的问题,希望能够对大家有所帮助。