iis服务器助手广告广告
返回顶部
首页 > 资讯 > 服务器 >ubuntu服务器安装proftpd ftp服务器的详细过程
  • 943
分享到

ubuntu服务器安装proftpd ftp服务器的详细过程

2023-06-13 05:06:57 943人浏览 独家记忆
摘要

这篇文章主要讲解了“ubuntu服务器安装proftpd ftp服务器的详细过程”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“ubuntu服务器安装proftpd ftp服务器的详细过程”吧

这篇文章主要讲解了“ubuntu服务器安装proftpd ftp服务器的详细过程”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“ubuntu服务器安装proftpd ftp服务器的详细过程”吧!

一、安装

代码如下:


sudo apt-get install proftpd

安装过程中会让选择运行模式:Standalone和Inetd,前者是单一服务器模式,后者是超级服务器模式,
我选的Standalone。

二、配置

代码如下:


sudo vim /etc/shells

加入如下代码

代码如下:


/bin/false

新建用户ftpuser1和用户组ftp并设置密码,此用户不需要有效的shell(更安全),所以选择/bin/false
给fptuser1

代码如下:


sudo groupadd ftp
sudo useradd ftpuser1 -p pass -g ftp -d /home/ftp -s /bin/false

在/home/ftp目录下新建upload和download目录并修改权限

代码如下:


cd /home/ftp
sudo mkdir download
sudo mkdir upload
cd /home
sudo chmod 755 ftp
cd /home/ftp
sudo chmod 755 download
sudo chmod 777 upload

三、修改proftpd核心配置文件proftpd.conf

代码如下:


sudo vim /etc/proftpd/proftpd.conf
#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
#
# Includes DSO modules
Include /etc/proftpd/modules.conf
# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6    off    # 我们不需要IPv6,所以off
ServerName   "xiaoyigeng's FTP Server"    # 修改服务器名
ServerType   standalone    # 服务器运行模式,这里填standalone,也可以选
inetd
DeferWelcome   on    # 用户登陆时是否显示欢迎信息
MultilineRFC2228  on
DefaultServer   on
ShowSymlinks   on
TimeoutNoTransfer  600
TimeoutStalled   600    # 可以降到100
TimeoutIdle   1200    # 发呆超时
DisplayLogin                    welcome.msg    # 如果上边DeferWelcom设置成on,则显示
welcome.msg中的内容
DisplayFirstChdir               .message    # 更改目录时显示的内容
ListOptions                 "-l"
DenyFilter   \*.*/
# Use this to jail all users in their homes
DefaultRoot /home/ftp    # ftp用户被限制在这个目录中
# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
# RequireValidShell  off    # 匿名用户要选on
# Port 21 is the standard FTP port.
Port    21    # 服务运行的端口
# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts                  49152 65534    # PASV模式下用到的端口
# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
# MasqueradeAddress  1.2.3.4
# 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    nobody    # 服务器运行在nobody用户下
Group    nobody    # 服务器运行在nobody组下
# Umask 022 is a Good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask    022  022    # 默认新建文件的权限
# Normally, we want files to be overwriteable.
AllowOverwrite   on    # 文件可以被覆盖
# Uncomment this if you are using NIS or LDAP to retrieve passWords:
# PersistentPasswd  off
# Be warned: use of this directive impacts CPU average load!
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
#
# UseSendFile   off
# Choose a sql backend among MySQL or postgresql.
# Both modules are loaded in default configuration, so you have to specify the backend
# or comment out the unused module in /etc/proftpd/modules.conf.
# Use 'Mysql' or 'postgres' as possible values.
#
#<IfModule mod_sql.c>
# SQLBackend   mysql
#</IfModule>
TransferLog /var/log/proftpd/xferlog    # 传送文件日志
SystemLog   /var/log/proftpd/proftpd.log    # 系统运行日志
<IfModule mod_tls.c>
TLSEngine off
</IfModule>
<IfModule mod_quota.c>
QuotaEngine on
</IfModule>
<IfModule mod_ratio.c>
RatiOS on
</IfModule></p><p># Delay engine reduces impact of the so-called Timing Attack described in
# <a href="Http://security.lss.hr/index.PHP?page=details&ID=LSS-2004-10-02">http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02</a>
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>
<IfModule mod_ctrls.c>
ControlsEngine        on
ControlsMaxClients    2
ControlsLog           /var/log/proftpd/controls.log
ControlsInterval      5
ControlsSocket        /var/run/proftpd/proftpd.sock
</IfModule>
<IfModule mod_ctrls_admin.c>
AdminControlsEngine on
</IfModule>
# A basic anonymous configuration, no upload directories.
# <Anonymous ~ftp>
#   User    ftp
#   Group    nogroup
#   # We want clients to be able to login with "anonymous" as well as "ftp"
#   UserAlias   anonymous ftp
#   # Cosmetic changes, all files belongs to ftp user
#   DirFakeUser on ftp
#   DirFakeGroup on ftp
#
#   RequireValidShell  off
#
#   # 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
#   <Directory *>
#     <Limit WRITE>
#       DenyAll
#     </Limit>
#   </Directory>
#
#   # Uncomment this if you're brave.
#   # <Directory incoming>
#   #   # Umask 022 is a good standard umask to prevent new files and dirs
#   #   # (second parm) from being group and world writable.
#   #   Umask    022  022
#   #            <Limit READ WRITE>
#   #            DenyAll
#   #            </Limit>
#   #            <Limit STOR>
#   #            AllowAll
#   #            </Limit>
#   # </Directory>
#
# </Anonymous>
# Valid Logins    # 以下部分为设置用户权限部分
<Limit LOGIN>
 AllowUser ftpuser1
 DenyAll
</Limit>
<Directory /home/ftp>
 Umask 022 022
 AllowOverwrite off
 <Limit MKD STOR DELE XMKD RNRF RNTO RMD XRMD>
   DenyAll
 </Limit>
</Directory>
<Directory /home/ftp/download/>
 Umask 022 022
 AllowOverwrite off
 <Limit MKD STOR DELE XMKD RNEF RNTO RMD XRMD>
   DenyAll
 </Limit>
</Directory>
<Directory /home/ftp/upload/>
 Umask 022 022
 AllowOverwrite on
 <Limit READ RMD DELE>
   DenyAll
 </Limit>
 <Limit STOR CWD MKD>
   AllowAll
 </Limit>
</Directory>

四、启动、停止、重启服务器

代码如下:


sudo /etc/init.d/proftpd start
sudo /etc/init.d/proftpd stop
sudo /etc/init.d/proftpd restart

五、维护

可以到/var/log/proftpd目录查看日志

查看ftp服务器负载命令 ftptop
查看什么认登陆服务器 ftpwho

PS:proftpd中Limit的使用介绍

我们用到的比较多的可能是Limit的使用,Limit大致有以下动作,基本能覆盖全部的权限了。

CMD:Change Working Directory 改变目录
MKD:MaKe Directory 建立目录的权限
RNFR: ReName FRom 更改目录名的权限
DELE:DELEte 删除文件的权限
RMD:ReMove Directory 删除目录的权限
RETR:RETRieve 从服务端下载到客户端的权限
STOR:STORe 从客户端上传到服务端的权限
READ:可读的权限,不包括列目录的权限,相当于RETR,STAT等
WRITE:写文件或者目录的权限,包括MKD和RMD
DIRS:是否允许列目录,相当于LIST,NLST等权限,还是比较实用的
ALL:所有权限
LOGIN:是否允许登陆的权限
针对上面这个Limit所应用的对象,又包括以下范围
AllowUser 针对某个用户允许的Limit
DenyUser 针对某个用户禁止的Limit
AllowGroup 针对某个用户组允许的Limit
DenyGroup 针对某个用户组禁止的Limit
AllowAll 针对所有用户组允许的Limit
DenyAll 针对所有用户禁止的Limit

关于限制速率的参数为:
TransferRate STOR|RETR 速度(Kbytes/s) user 使用者

感谢各位的阅读,以上就是“ubuntu服务器安装proftpd ftp服务器的详细过程”的内容了,经过本文的学习后,相信大家对ubuntu服务器安装proftpd ftp服务器的详细过程这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是编程网,小编将为大家推送更多相关知识点的文章,欢迎关注!

--结束END--

本文标题: ubuntu服务器安装proftpd ftp服务器的详细过程

本文链接: https://www.lsjlt.com/news/265505.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • ubuntu服务器安装proftpd ftp服务器的详细过程
    这篇文章主要讲解了“ubuntu服务器安装proftpd ftp服务器的详细过程”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“ubuntu服务器安装proftpd ftp服务器的详细过程”吧...
    99+
    2023-06-13
  • Ubuntu安装ssh服务详细过程
    安装SSH服务的详细过程如下:1. 打开终端,使用管理员权限登录系统。2. 使用以下命令安装SSH服务:```sudo apt up...
    99+
    2023-09-21
    Ubuntu
  • centos安装svn服务器详细过程
    这篇文章主要讲解了“centos安装svn服务器详细过程”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“centos安装svn服务器详细过程”吧! 安装SVN 代码如下:yum list sv...
    99+
    2023-06-10
  • 阿里云服务器Ubuntu 20.04上安装Odoo 15的详细过程
    ​​Odoo15入门系列介绍 Odoo 15 是一个基于Python语言构建的开源软件,面向企业应用的CRM,ERP等领域,其目标是对标SAP,Oracle等大型软件提供商,但却通过...
    99+
    2022-11-13
  • 云服务器(Linux)安装部署Kafka的详细过程
    目录云服务器(linux)安装部署Kafka前期准备下载安装包上载安装包到云服务器配置kafka开放云服务器端口开放linux防火墙端口启动kafka服务测试单机连通性Springboot连接kafak云服务器(Linu...
    99+
    2022-11-15
  • 怎么理解FTP服务器中的proftpd
    今天就跟大家聊聊有关怎么理解FTP服务器中的proftpd,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。ProFTPD:一个Unix平台上或是类Unix平台上(如Linux, Fre...
    99+
    2023-06-16
  • ubuntu1804搭建FTP服务器的详细教程
    搭建FTP服务器 FTP的工作原理: FTP:File Transfer Protocol ,文件传输协议。属于NAS存储的一种协议,基于CS结构。 ftp采用的是双端口模式,分为命...
    99+
    2022-12-09
    ubuntu1804搭建FTP服务器 ubuntu搭建FTP服务器
  • window搭建ftp服务器详细教程
    本文为大家分享了window下搭建ftp服务器详细图文教程,供大家参考,具体内容如下 第一部分、搭建 1.创建用于登陆ftp的用户:打开计算机管理程序,依次点击左侧本地用户组&nda...
    99+
    2022-11-13
  • Windows搭建FTP服务器详细教程
    本文为大家分享了Windows搭建FTP服务器详细图文教程,供大家参考,具体内容如下 前言:搭建之前,先确保你的电脑上:控制面板 >> 程序 >> 启用或关闭...
    99+
    2022-11-13
    Windows FTP 服务器
  • 云服务器安装ftp
    如果您需要在云服务器上安装ftp客户端,您需要先安装ftp客户端软件。FTP客户端软件需要您的计算机上有一个可以上网的网络适配器,例如路由器或互联网连接。 以下是在云服务器上安装FTP客户端的步骤: 准备所需的软件和网络适配器设备:您需...
    99+
    2023-10-26
    服务器 ftp
  • Ubuntu下怎么安装和配置FTP服务器
    这篇“Ubuntu下怎么安装和配置FTP服务器”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“Ubuntu下怎么安装和配置FT...
    99+
    2023-06-28
  • Clash Linux服务器安装详细教程
    目录Clash软件安装软件下载地址设置系统代理(方法1)设置系统代理(方法2,使用proxychains4)UI设置设置clash开机启动Clash软件安装 软件下载地址 githu...
    99+
    2022-11-13
    Clash Linux服务器安装 Linux Clash安装
  • Clash Linux服务器安装详细教程
    目录Clash软件安装软件下载地址设置系统代理(方法1)设置系统代理(方法2,使用proxychains4)UI设置设置clash开机启动Clash软件安装 软件下载地址 github公开地址: https:/...
    99+
    2022-10-30
  • CentOS7 安装配置FTP服务器详解
    CentOS7 安装配置FTP服务器详解 1、FTP简介 ftp(File Transfer Protocol文件传输协议)是基于TCP/IP 协议的应用层协议,用于文件的传输,包括ftp服务器(或服...
    99+
    2023-08-31
    linux centos
  • ubuntu在线服务器python Package安装到离线服务器的过程
    1、在线服务器导出requirement.txt  pip freeze > requirement.txt 该文件生成完毕后,需要做些修改,去掉不需要的库,否则下载...
    99+
    2023-05-16
    python Package安装到离线服务器 ubuntu离线安装python
  • Linux系统安装zabbix服务的详细过程
    本篇内容主要讲解“Linux系统安装zabbix服务的详细过程”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Linux系统安装zabbix服务的详细过程”吧!一、准备环境系统:CentOS 65...
    99+
    2023-06-04
  • ubuntu服务器ubuntu Server安装教程
    记录一次系统安装到拷贝大数据文件的过程。 说在前:1.系统U盘启动安装软件Rufus,自行百度下载2.下载Ubuntu Server镜像,官方地址即可 一、安装 1、选择Ubuntu Server ...
    99+
    2023-09-26
    ubuntu 服务器 linux
  • 云服务器怎么安装ftp服务器
    要在云服务器上安装FTP服务器,可以按照以下步骤进行操作:1. 登录到云服务器的操作系统。可以使用SSH协议远程登录服务器。2. 安...
    99+
    2023-09-26
    云服务器 ftp服务器 服务器
  • 云服务器如何安装ftp服务器
    要在云服务器上安装FTP服务器,可以按照以下步骤进行操作:1. 登录云服务器。可以使用SSH客户端(如PuTTY)通过SSH协议连接...
    99+
    2023-09-23
    云服务器 ftp服务器 服务器
  • 【SVN】SVN搭建ubuntu服务器过程(图文超详细)
    目录 步骤0:搭建环境: 步骤一:下载subversion安装包 步骤二:创建版本库目录 步骤三:创建版本库 步骤四:修改SVN配置 步骤五:重启SVN服务 步骤0:搭建环境: 在ubuntu系统搭建svn服务器,windows系统作...
    99+
    2023-10-24
    服务器 svn ubuntu
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作