0.vsftpd与ftp安装

yum install -y vsftpd ftp

1.vsftpd 服务启停相关命令

systemctl start vsftpd
systemctl stop vsftpd
systemctl restart vsftpd
systemctl status vsftpd

2.配置文件/etc/vsftpd/vsftpd.conf相关配置选项

# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
# You may change the default value for timing out an idle session.
idle_session_timeout=
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
chroot_local_user=YES
allow_writeable_chroot=YES pam_service_name=vsftpd
# Set to NO if you want to disallow the PASV method of obtaining a data
# connection.
#
pasv_enable=YES
pasv_max_port=
pasv_min_port= max_clients=
max_per_ip=

  a.如果allow_writeable_chroot为NO,ftp登录时出现以下错误。

 OOPS: vsftpd: refusing to run with writable root inside chroot()
Login failed.
Service not available, remote server has closed connection

3. sestatus -b|grep ftp查看SELinux相关boolean变量,setsebool修改相关变量,修改结果如下示:

ftpd_anon_write                             off
ftpd_connect_all_unreserved off
ftpd_connect_db off
ftpd_full_access on
ftpd_use_cifs off
ftpd_use_fusefs off
ftpd_use_nfs off
ftpd_use_passive_mode off
httpd_can_connect_ftp off
httpd_enable_ftp_server off
tftp_anon_write off
tftp_home_dir off

  a.如果ftpd_full_access为off,ftp登录时将出现以下错误。

 OOPS: chroot
Login failed.
Service not available, remote server has closed connection

4.创建仅供ftp登录(不允许ssh)的用户ftpuser

  a.查看nologin:

whereis nologin

  b.创建用户ftpuser:

useradd -d /home/ftpuser -m -s /usr/sbin/nologin ftpuser

  c.设置ftpuser密码:

passwd ftpuser

5. firewall-config GUI防火墙配置中开启ftp服务,或firewall-cmd 命令行开启ftp服务

a.firewall-config开启服务

b.firewall-cmd开启服务

//开启ftp服务
firewall-cmd --add-service=ftp
//列出服务列表
firewall-cmd --list-services

参考:

1.vsftpd 配置:chroot_local_user与chroot_list_enable详解

2.Install and Configure VSFTPD / SFTP on CentOS 7

3.关于ftp的选择:vsftpd 和proftpd

4.Install and configure FTP server in Redhat/Centos Linux

5.FTP主动模式和被动模式的区别

RedHatEnterpriseLinuxServerRelease7.3上配置vsftpd服务器的更多相关文章

  1. RedHatEnterpriseLinuxServerRelease7.3上配置vsftp服务器

    1.vsftpd 服务启停相关命令 systemctl start vsftpd systemctl stop vsftpd systemctl restart vsftpd 2.配置文件/etc/v ...

  2. 在windwo server2008服务器上配置ftp服务器、及配置phpstrom工具、实现项目同步。

    在windwo server2008服务器上配置ftp服务器.及配置phpstrom工具.实现项目同步. 在windwo server2008服务器上配置ftp服务器 参考该篇文章:http://bl ...

  3. (转载)在vmware中简单配置vsftpd服务器

    (转载)http://blog.chinaunix.net/uid-7453676-id-2625582.html 分类: LINUX 一 试验的前期环境搭建   系统环境:Fedora 2   软件 ...

  4. 在Linux上配置vsftpd

    一般安装好vsftpd这个服务,它的默认配置文件在这里:/etc/vsftpd/vsftpd.conf 用vim在里面可以添加一些变量控制权限之类的.还有很多chroot相关的东西,里面的变量都有作用 ...

  5. centos7配置vsftpd服务器

    参考网站:https://blog.csdn.net/lianghongge/article/details/78209445 ==================================== ...

  6. 使用postfix在debian上配置邮件服务器

    如果debian中安装了exim4,先卸载exim4: apt-get remove exim4 安装postfix apt-get install postfix 安装完成后就可以测试下,PHP代码 ...

  7. 阿里云上 配置 vsftpd 配置文件 (一个成功例子)

    # # READ THIS: This example file is NOT an exhaustive list of vsftpd options. # Please read the vsft ...

  8. 如何配置vsftpd服务器

    1,通过yum查看本地是否存在vsftpd rpm -qa|grep vsftpd [root@node2 ~]# rpm -qa |grep vsftpdvsftpd-3.0.2-25.el7.x8 ...

  9. 四条命令快速在Ubuntu16.04上配置DNS服务器

    1. apt install dnsmasq -y 2. vim /etc/dnsmasq.d/resolv.conf address=/xxx.yyy.com/21.xx.xx.x 3. servi ...

随机推荐

  1. April 25 2017 Week 17 Tuesday

    Have you ever known the theory of chocie? There are a bunch of axiems, but there are only two thing ...

  2. C4C和Outlook的集成

    从C4C系统下载Outlook的Addin, 安装之后,会在Outlook里看见一个新的面板: 点击Log On登录: 如果需要的话,在Settings里设置proxy. 登录之后,即可立即在outl ...

  3. 154. Find Minimum in Rotated Sorted Array II(Binary search)

    https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/description/ -- leetcode follo ...

  4. setTimeout详解

    一.setTimeout基础 setTimeout(func|code,delay); 第一个参数表示将要推迟的函数名或者一段代码,第二个参数表示推迟执行的毫秒数   eg: console.log( ...

  5. node.js 下使用 util.inherits 来实现继承

    上一篇博客说到了node.js继承events类实现事件发射和事件绑定函数,其中我们实现了一个公用基类 _base ,然后在模型中差异化的定义了各种业务需要的模型并继承 _base 公共基类.但是其中 ...

  6. c# base new 等关键字基础

    base关键字 不仅可以  调用父类的 实例方法,也能狗调用父类的 构造方法 https://www.cnblogs.com/aehyok/p/3519599.html

  7. kubernetes-控制器statefulset和Job(十三)

       从前面的学习我们知道使用Deployment创建的pod是无状态的,当挂载了Volume之后,如果该pod挂了,Replication Controller会再启动一个pod来保证可用性,但是由 ...

  8. python-一切事物都是对象

    python:一切事物都是对象 开始接触python,在里面有一句话“一切事物都是对象”,那么如何来理解这句话呢,下面举简单的例子: a=1 b='hello't=(11,22,33) list1=[ ...

  9. 多重网格方法(Multigridmethod)

    原文链接 多重网格方法是解微分方程的方法.这个方法的好处是在利用迭代法收敛结果的时候速度特别快.并且,不管是否对称,是否线性都无所谓.它的值要思想是在粗糙结果和精细结果之间插值. 前面介绍了Gauss ...

  10. ajax模仿form上传图片

    <form id="iconForm"> <input class="js_upFile cover1" type="file&qu ...