ProFtpd下软件的配置

系统 Linux 系统运维
ProFtpd下软件该如何配置?ProFTPD是个Unix平台上或是类Unix平台上(如Linux, FreeBSD...)的FTP服务器程序。它是在自由软件基金会的版权声明(GPL)之下开发 发布的免费软件。也可以说,只要任何人遵守GPL版权的声明,全都可以随意修改源始码。本文讲述的是ProFtpd下软件的配置。

ProFtpd软件该如何配置?ProFTPD是个Unix平台上或是类Unix平台上(如Linux, FreeBSD...)的FTP服务器程序。它是在自由软件基金会的版权声明(GPL)之下开发 发布的免费软件。也可以说,只要任何人遵守GPL版权的声明,全都可以随意修改源始码。本文讲述的是ProFtpd下软件的配置。

  初始配置文件。默认配置文件的位置为:

  

  1. /usr/local/etc/proftpd.conf (如果文件不存在可以从压缩包中把配置文件样例拷贝过来即可)下面逐项分析其中一些常选项:(#后面的部分是注释)  
  2.  
  3.   # This is a basic ProFTPD  
  4.  
  5.   configuration file  
  6.  
  7.   (rename it to  
  8.  
  9.   # 'proftpd.conf' for actual use.  
  10.  
  11.   It establishes a single server  
  12.  
  13.   # and a single anonymous login.  
  14.  
  15.   It assumes that you have a user/group  
  16.  
  17.   # "nobody" and "ftp" for normal  
  18.  
  19.   operation and anon.  
  20.  
  21.   ServerName "  
  22.  
  23.   ServerType  
  24.  
  25.   standalone  
  26.  
  27.   DefaultServer  
  28.  
  29.   on  
  30.  
  31.   # Port 21 is the standard FTP port.  
  32.  
  33.   Port 21  
  34.  

  ServerType 指定FTP Server 的启动类型,一般使用standalone方式比较简单,如果访问量不大,为节省资源考虑用xinetd侦听启动,必须在这里指定。Port 指定FTP的侦听端口,一般使用21端口

  

  1. # Umask 022 is a good standard  
  2.  
  3.   umask to prevent new dirs and files  
  4.  
  5.   # from being group and world writable.  
  6.  
  7.   Umask 022  
  8.  
  9.   # To prevent DoS attacks, set the  
  10.  
  11.   maximum number of child processes  
  12.  
  13.   # to 30. If you need to allow  
  14.  
  15.   more than 30 concurrent connections  
  16.  
  17.   # at once, simply increase this value.  
  18.  
  19.   Note that this ONLY works  
  20.  
  21.   # in standalone mode, in inetd mode  
  22.  
  23.   you should use an inetd server  
  24.  
  25.   # that allows you to limit maximum  
  26.  
  27.   number of processes per service  
  28.  
  29.   # (such as xinetd).  
  30.  
  31.   MaxInstances 30  
  32.  
  33.   Umask 指定FTP server 进程的Umask 值,022与Linux系统得默认值一致。  
  34.  
  35.   MaxInstances 指定 FTP server 的最大连接数。  
  36.  
  37.   # Set the user and group under  
  38.  
  39.   which the server will run.  
  40.  
  41.   User nobody  
  42.  
  43.   Group nogroup  
  44.  
  45.   # To cause every FTP user to be  
  46.  
  47.   "jailed" (chrooted) into their home  
  48.  
  49.   # directory, uncomment this line.  
  50.  
  51.   #DefaultRoot ~  
  52.  
  53.   DefaultRoot  
  54.  

#p#  

User 和Group 指定proftpd 进程启动时的有效用户ID,处于安全考虑默认的身份是nobody,有一点要指出的是,一般Red Linux 9.0 中默认是没有nogroup 这个组的,把Group指定为nobody 即可。

  DefaultRoot 选项限制Linux 系统用户通过FTP方式登录时将被限制在其home 目录下。

 

  1.  # Set the maximum number of seconds  
  2.  
  3.   a data connection is allowed  
  4.  
  5.   # to "stall" before being aborted.  
  6.  
  7.   #TimeoutStalled 300  
  8.  
  9.   AllowRetrieveRestart on  
  10.  
  11.   AllowStoreRestart on  
  12.  
  13.   # Normally, we want files to be overwriteable.  
  14.  
  15.   AllowOverwrite on  
  16.  
  17.   TimeoutStalled 指定一个连接的超时时间。  
  18.  
  19.   AllowRetriveRestart 和AllowStroeRestart 指定允许断点续传。  
  20.  
  21.   User ftp  
  22.  
  23.   Group ftp  
  24.  
  25.   # We want clients to be able to  
  26.  
  27.   login with "anonymous"  
  28.  
  29.   as well as "ftp"  
  30.  
  31.   UserAlias anonymous ftp  
  32.  
  33.   # Limit the maximum number of anonymous logins  
  34.  
  35.   MaxClients 10  
  36.  
  37.   # We want 'welcome.msg' displayed  
  38.  
  39.   at login, and '.message' displayed  
  40.  
  41.   # in each newly chdired directory.  
  42.  
  43.   DisplayLogin welcome.msg  
  44.  
  45.   DisplayFirstChdir .message  
  46.  
  47.   # Limit WRITE everywhere  
  48.  
  49.   in the anonymous chroot  
  50.  
  51.   DenyAll  

【编辑推荐】

  1. ProFTPD.conf的详细配置方法
  2. ProFTPD的配置文件proftpd.conf
  3. ProFTP下的参数说明
  4. Porftpd.conf的配置格式
  5. lampp的ProFTPd下新增FTP用户的方法
  6. Debian下配置ProFTPd服务器
  7. Centos下ProFTPD配置FTP服务器
  8. 用MySQL和Proftpd配置FTP服务器

 

责任编辑:zhaolei 来源: CSDN网
相关推荐

2011-03-08 17:04:10

ProFTPDUbuntu

2011-02-22 16:24:30

2011-03-03 10:49:37

Linux配置Proftpd

2011-02-25 13:41:59

Proftpdanonymous

2011-03-03 13:00:21

2011-02-22 10:08:46

ProFTPD配置

2011-02-23 12:18:28

DebianProFTPd服务器

2011-02-22 14:50:53

ProFTPD

2011-03-08 10:10:37

Linuxproftpd

2011-02-23 10:18:51

CentosProFTPD

2011-02-24 13:15:59

2011-02-23 11:15:21

DebianProFTPd

2011-02-25 16:39:34

proftpd配置文件

2011-03-03 14:47:35

2011-03-03 09:04:25

2011-03-03 14:47:35

2011-02-25 14:35:06

ubuntuproftp安装

2011-02-24 14:47:48

ProFTPD

2011-02-23 10:43:17

2011-03-03 13:16:32

Proftpd配置文件
点赞
收藏

51CTO技术栈公众号