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上配置vsftp服务器的更多相关文章

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

    0.vsftpd与ftp安装 yum install -y vsftpd ftp 1.vsftpd 服务启停相关命令 systemctl start vsftpd systemctl stop vsf ...

  2. asp.net core 简单部署之FTP配置(CentOS 7.0安装配置Vsftp服务器)

    配置过程原文地址:http://www.osyunwei.com/archives/9006.html 坑和结果 正确的跟着这个内容走,是靠谱的. 我自己给自己踩了个坑,请参照文章的朋友注意第七条:七 ...

  3. CentOS 7.0安装配置Vsftp服务器

    一.配置防火墙,开启FTP服务器需要的端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop fi ...

  4. 配置VSFTP服务器

    一.Linux FTP服务器分类:  <1>wu-ftp  <2>proftp=profession ftp  <3>vsftp=very security ftp ...

  5. CentOS 7.0安装配置Vsftp服务器步骤详解

    安装Vsftp讲过最多的就是在centos6.x版本中了,这里小编看到有朋友写了一篇非常不错的CentOS 7.0安装配置Vsftp服务器教程,下面整理分享给各位. 一.配置防火墙,开启FTP服务器需 ...

  6. 【转发】【linux】【ftp】CentOS 7.0安装配置Vsftp服务器

    adduser -d /var/www/android -g ftp -s /sbin/nologin ftp2 一.配置防火墙,开启FTP服务器需要的端口 CentOS 7.0默认使用的是firew ...

  7. CentOS 7.2安装配置Vsftp服务器

    一.配置防火墙,开启FTP服务器需要的端口 CentOS 7.2默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop fi ...

  8. CenOS配置VSFTP服务器

    1 Linux FTP服务器分类: wu-ftp proftp=profession ftp vsftp=very security ftp 2 安装vsftp yum install vsftp 3 ...

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

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

随机推荐

  1. mysql中独立表空间与共享表空间之前如何切换

    环境 mysql版本:5.7.19 官方文档:(https://dev.mysql.com/doc/refman/5.7/en/innodb-multiple-tablespaces.html) 查看 ...

  2. 如何从0开发一个Atom组件

    最近用Atom写博客比较多,然后发现一个很严重的问题..没有一个我想要的上传图片的方式,比如某乎上边就可以直接copy/paste文件,然后进行上传.然而在Atom上没有找到类似的插件,最接近的一个, ...

  3. 给工作添点乐趣--- 为Idea编译时打印图案

    控制台输出图案--banner 之前用vs开发时,也可以自己设置编译时控制台打印出的图案,我们管它叫banner. 给idea设置banner 先见一下效果图 还有重磅的 好了.其实设置这个很简单.分 ...

  4. 开源纯C#工控网关+组态软件(九)定制Visual Studio

    一.   引子 因为最近很忙(lan),很久没发博了.不少朋友对那个右键弹出菜单和连线的功能很感兴趣,因为VS本身是不包含这种功能的.   大家想这是什么鬼,怎么我的设计器没有,其实这是一个微软黑科技 ...

  5. amd屏幕亮度无法调整,无法调节亮度

    1:CMD+R键打开"运行",输入"regedit"进入注册表 2:搜索"KMD_EnableBrightnessInterface2",找 ...

  6. js变量的生命周期

    1.在JavaScript中,对于for循环中定义的i变量,其生命周期在循环结束后仍然是有效的. for (var i=0; i < 10; i++){ doSomething(i); } al ...

  7. drupal8的安装

    一.首先安装好linux系统虚拟机 1.在drupal官网上下载drupal包,https://www.drupal.org/download 我下载的是 https://ftp.drupal.org ...

  8. [LeetCode] Baseball Game 棒球游戏

    You're now a baseball game point recorder. Given a list of strings, each string can be one of the 4 ...

  9. [LeetCode] Next Greater Element III 下一个较大的元素之三

    Given a positive 32-bit integer n, you need to find the smallest 32-bit integer which has exactly th ...

  10. UVA - 11235:Frequent values

    非常优美的RMQ问题,可以运到桶的思想 #include<cstdio> #include<cstdlib> #include<algorithm> #includ ...