配置文件在etc/proftpd.conf,配置文件说明如下:

ServerName                     "ProFTPD Default Installation"
ServerType                     standalone
DefaultServer                  on

分别表示:服务器名称,服务类型和默认服务状态!

后面的服务端口啊什么的我就省去不说了,说最关键的权限控制部分。

# Set the user and group under which the server will run.
User                           nobody
Group                          nogroup

注意看上面:以什么用户和什么组来运行服务。

更改为你现有的组和用户,这里为了管理上的方便和安全性上考虑,建议新建一个ftp组和ftp用户。

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~
是否允许用户进入用户的主目录,注意:可是适用/home替代

# Normally, we want files to be overwriteable.
AllowOverwrite         on
是否具有重写的权利

# A basic anonymous configuration, no upload directories. If you do not
# want anonymous users, simply delete this entire <Anonymous> section.
<Anonymous ~ftp>
 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
 <Limit WRITE>
   DenyAll
 </Limit>
</Anonymous>

这部分是匿名用户的定义其实也很简单。

------------------------------------------------

启动不了,出现如下错误的解决方法

[root@new-host sbin]# ./proftpd
 - IPv4 getaddrinfo 'new-host' error: Name or service not known
 - warning: unable to determine IP address of 'new-host'
 - error: no valid servers configured
 - Fatal: error processing configuration file '/usr/local/proftpd/etc/proftpd.conf'

原因是无法绑定Ip地址。

在配置文件中增加下面这句:

DefaultAddress                 192.168.8.105
再重启服务就可以了!

对出现的530 Login incorrect错误,查看日志发现Invalid shell错误
在配置中添加

RequireValidShell             off 

"Fatal: Socket operation on non-socket"
  这通常意味着在 proftpd.conf 配置文件中 ServerType 指令被配置成 inetd
  (超级服务器)方式而不是 standalone(独立服务器) 方式来运行。

PROFTPD服务器相关命令

1、ftpshut:关闭FTP服务,并在/etc下生成文件shutmsg。要重新开放FTP服务,把/etc/shutmsg删除。
2、ftpcout:FTP服务器在线人数信息显示。
3、ftpwho:FTP服务器在线人员名单。

几个文件的功能及路径
/usr/local/sbin/proftpd 执行程序
/usr/local/etc/proftpd.conf 设置文件
/usr/local/var/proftpd.pid proftpd做为一个服务的ID号

设定proftpd.conf文件,起动服务

cd /etc/rc.d/rc3.d
ln -s /usr/local/sbin/proftpd S99proftpd

或者
修改/etc/rc.d/rc.local
加上下面这句
/usr/local/sbin/proftpd start

proftpd 怎么查看在线连接的ip

登陆服务器
输入 ftpwho
或ftptop
ftptop可以显示在线人的ip 速度等

//

ProFTPD configuration

先建立ftp和media用户,用户组为nogroup,不允许登录系统

useradd media -d/home/media -gnogroup

增加权限

chown -R media /hoem/media

要使ftp用户登录要修改/etc/ftpuser文件注释掉ftp

内网架设FTP服务器的方法:
1. 在proftpd.conf中利用MasqueradeAddress命令将网关的IP地址或域名指定给FTP服务器,例如
MasqueradeAddress myftpserver.vicp.net   ?????
或MasqueradeAddress 12.34.56.78          ?????经使用只能连接不能下载
然后通过PassivePorts命令来限制被动方式下监听的端口的范围,例如
PassivePorts 60000 65534
2. 在网关的端口映射上将第一步中指定的端口范围(例中为60000-65534)以及FTP端口21映射到FTP服务器的内网地址上。

getaddrinfo 'test' error: Name or service not known
- warning: unable to determine IP address of 'test'
- error: no valid servers configured
- Fatal: error processing configuration file '/etc/proftpd.conf'
解决:产生该问题是由于hosts文件里机器名未增加别名引起的。
#vi /etc/host

proftpd登陆速度慢的问题的解决

proftpd.conf中增加两行设置:
UseReverseDNS off
IdentLookups off

# This is a basic ProFTPD configuration file.
# It establishes a single server and a single anonymous login.
# It assumes that you have a user/group "nobody" and "ftp"
# for normal/anonymous operation.

ServerName   "ProFTPD Default Installation"
ServerType   standalone
#ServerType   inetd
DefaultServer   on

UseReverseDNS off
IdentLookups off

# 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 limit maximum number of processes per service
# (such as xinetd)
MaxInstances   30

# Set the user and group that the server normally runs at.
User  ftp
# nobody
Group  nogroup
# nogroup
# This next option is required for NIS or NIS+ to work properly:
#PersistentPasswd off

SystemLog   /var/log/proftpd.log
TransferLog   /var/log/xferlog

DefaultAddress  192.168.1.254
# Normally, we want files to be overwriteable.
<Directory /*>
  AllowOverwrite  on
</Directory>

<Anonymous ~media>
  RequireValidShell  off
  User   media 
  Group         nogroup 
  MaxClients   50
  DisplayLogin   welcome.msg
  DisplayFirstChdir  .message
<Directory /*>
  <Limit All>
    AllowAll
  </Limit>
</Directory>
</Anonymous>
# A basic anonymous FTP server configuration.
# To enable this, remove the user ftp from /etc/ftpusers.
<Anonymous ~ftp>
  RequireValidShell  off
  User   ftp
  Group         nogroup 
  # 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   50

# We want 'welcome.msg' displayed at login, and '.message' displayed
  # in each newly chdired directory.
  DisplayLogin   welcome.msg
  DisplayFirstChdir  .message

# An upload directory that allows storing files but not retrieving
  # or creating directories.
  <Directory /*>
    <Limit READ>
      AllowAll
    </Limit>

# Limit WRITE everywhere in the anonymous chroot
  <Limit WRITE>
  AllowAll
  </Limit>
    <Limit STOR>
      AllowAll
    </Limit>
  </Directory>

</Anonymous>

本文转自yuangang_love 51CTO博客,原文链接:http://blog.51cto.com/linux008/1554634,如需转载请自行联系原作者

proftpd的搭建以及相关配置相关推荐

  1. Android系统开发篇(四) —— Samba服务器的搭建和相关配置

    书接上文,上文中我们说到了Android源码的下载和编译,那么为了高效率的操作和便于在Windows系统中去读取和修改源码:我们采用了Samba文件服务器,这个在linux行业里可以必备的技能.当然S ...

  2. centOs6.5版Linux系统中搭建Samba服务(附搭建Samba设置及相关配置参考)

    一.实验环境(仅做参考,可以用更新版本) Linux版本:CentOS-6.5-i386-bin-DVD1 虚拟机:VMware Workstation Pro14.1.3 虚拟机设置为桥接模式,虚拟 ...

  3. ISA Server实验环境搭建与企业×××配置

    ISAServer是微软在企业网络边界防护上的代表产品.从ISAServer2000到现在被广泛应用的ISAServer2004和ISAServer2006以及即将推出的ISAServer2008,都 ...

  4. Haproxy实现负载均衡及相关配置(添加日志、设定自动刷新时间、控制访问、动静分离、读写分离)

    1.HAProxy简介 (1)HAProxy 是一款提供高可用性.负载均衡以及基于TCP(第四层)和HTTP(第七层)应用的代理软件,支持虚拟主机,它是免费.快速并且可靠的一种解决方案. HAProx ...

  5. xampp 中 mysql的相关配置

    最近开始接触PHP,而一般搭建PHP环境使用的都是xampp 这个集成环境,由于之前我的系统中已经安装了mysql服务,所以在启动mysql的时候出现一些列错误,我通过查询各种资料解决了这个问题,现在 ...

  6. proftpd服务器搭建

    Linxu下搭建proftpd服务器步骤: 1.安装proftp:yum install proftpd 注意:需要预先配置好yum源 2.配置ftp用户和用户组: # groupadd ftptes ...

  7. 极速搭建vanish - 安装/配置/维护

    一. 简单安装varnish(三步搞定,直接复制代码执行) 创建基本配置环境 # 创建varnish 运行用户 /usr/sbin/groupadd www -g 80 /usr/sbin/usera ...

  8. DE10-Nano Ubuntu16 系统环境搭建及网络配置

    DE10-Nano Ubuntu16 系统环境搭建及网络配置 1. 背景介绍 2. 板载Linux系统搭建 3. 网络配置 3.1 无线网卡 3.2 局域网共享网络 3.3 SSH 远程连接 DE10 ...

  9. 七日杀开服架设教程开服配置服务器搭建需要什么配置的服务器Linux系统

    七日杀开服架设教程开服配置服务器搭建需要什么配置的服务器Linux系统 新开放世界僵尸游戏 <七日杀>是由The Fun Pimps Entertainment研发的集合第一人称射击.恐怖 ...

最新文章

  1. js在页面滚动到一定位置时触发事件?
  2. 宁德时代机器人编程开发_全球首例丨可编程的活体机器人已诞生,100%青蛙基因,超级计算机时代,将无所不能?!...
  3. linux内核中send与recv函数详解
  4. 基于深度前馈序列记忆网络,如何将语音合成速度提升四倍?
  5. JS-copy到剪贴板
  6. Google 2020游戏开发者峰会回顾、比尔•盖茨的夏日书单、Libaom 2.0.0发布等|Decode the Week...
  7. 关于面试,避开这几点,成功几率更大~~~
  8. PyQt5-高级控件使用(QTableView)
  9. android studio学习----通过github的URL怎么导入新的工程
  10. 工信部:2015年宽带城市20兆农村4兆
  11. C语言 求素数、排序算法
  12. 如何越过计算机开机密码,怎样跳过电脑开机密码教程
  13. 第13期-在线的文章摘要生成器, 自己写了一个支持中文的
  14. mysql连接显示“message from server :“Host ‘XXXX‘ is not allowed to connect to this MySQL server“”
  15. Postgresql12 安装及设置远程访问
  16. 如何制作人脸微笑检测程序
  17. 如何做好积分商城运营?
  18. uni-app 从本地相册选择图片或使用相机拍照
  19. new和delete的使用
  20. _【超详细指北】python大作业!

热门文章

  1. Python 3 尴尬了这么久,终于有救了
  2. API网关是否真的起到了它该有的作用?
  3. RabbitMQ 七战 Kafka,差异立现!
  4. Spring Boot+Gradle+ MyBatisPlus3.x搭建企业级的后台分离框架
  5. Nginx 为什么这么快?
  6. fork/join 全面剖析,你可以不用,但是不能不懂!
  7. JDK 13 新特性一览
  8. 面试题:mysql 数据类型
  9. Linux基础入门 | 目录结构
  10. 有了这个工具,不执行代码就可以找PyTorch模型错误