ProFtpd下软件的配置
创始人
2024-07-21 16:00:50
0

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服务器

 

相关内容

热门资讯

如何允许远程连接到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...