RedHatEnterpriseLinuxServerRelease7.3上配置vsftp服务器
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
4.Install and configure FTP server in Redhat/Centos Linux
RedHatEnterpriseLinuxServerRelease7.3上配置vsftp服务器的更多相关文章
- RedHatEnterpriseLinuxServerRelease7.3上配置vsftpd服务器
0.vsftpd与ftp安装 yum install -y vsftpd ftp 1.vsftpd 服务启停相关命令 systemctl start vsftpd systemctl stop vsf ...
- asp.net core 简单部署之FTP配置(CentOS 7.0安装配置Vsftp服务器)
配置过程原文地址:http://www.osyunwei.com/archives/9006.html 坑和结果 正确的跟着这个内容走,是靠谱的. 我自己给自己踩了个坑,请参照文章的朋友注意第七条:七 ...
- CentOS 7.0安装配置Vsftp服务器
一.配置防火墙,开启FTP服务器需要的端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop fi ...
- 配置VSFTP服务器
一.Linux FTP服务器分类: <1>wu-ftp <2>proftp=profession ftp <3>vsftp=very security ftp ...
- CentOS 7.0安装配置Vsftp服务器步骤详解
安装Vsftp讲过最多的就是在centos6.x版本中了,这里小编看到有朋友写了一篇非常不错的CentOS 7.0安装配置Vsftp服务器教程,下面整理分享给各位. 一.配置防火墙,开启FTP服务器需 ...
- 【转发】【linux】【ftp】CentOS 7.0安装配置Vsftp服务器
adduser -d /var/www/android -g ftp -s /sbin/nologin ftp2 一.配置防火墙,开启FTP服务器需要的端口 CentOS 7.0默认使用的是firew ...
- CentOS 7.2安装配置Vsftp服务器
一.配置防火墙,开启FTP服务器需要的端口 CentOS 7.2默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop fi ...
- CenOS配置VSFTP服务器
1 Linux FTP服务器分类: wu-ftp proftp=profession ftp vsftp=very security ftp 2 安装vsftp yum install vsftp 3 ...
- 在windwo server2008服务器上配置ftp服务器、及配置phpstrom工具、实现项目同步。
在windwo server2008服务器上配置ftp服务器.及配置phpstrom工具.实现项目同步. 在windwo server2008服务器上配置ftp服务器 参考该篇文章:http://bl ...
随机推荐
- python实现 多叉树 寻找最短路径
完全原创,能力有限,欢迎参考,未经允许,请勿转载 ! 完全原创,能力有限,欢迎参考,未经允许,请勿转载 ! 完全原创,能力有限,欢迎参考,未经允许,请勿转载 ! 完全原创,能力有限,欢迎参考,未经允许 ...
- Django中ORM介绍和字段及其参数
ORM介绍 ORM概念 对象关系映射(Object Relational Mapping,简称ORM)模式是一种为了解决面向对象与关系数据库存在的互不匹配的现象的技术. 简单的说,ORM是通过使用描述 ...
- 教你如何用AST语法树对代码“动手脚”
个推安卓工程师,负责公司移动端项目的架构和开发,主导移动端日志管理平台系统架构和开发工作,熟悉前后端的技术线,参与个推SDK主要业务研发工作,善于解决项目中遇到的痛点问题. 作为程序猿,每天都在写代码 ...
- round()函数 浮点数的四舍五入
浮点数的四舍五入 print round(1.7333) 2.0
- SpringMVC 使用MultipartFile实现文件上传(转)
http://blog.csdn.net/kouwoo/article/details/40507565 一.配置文件:SpringMVC 用的是 的MultipartFile来进行文件上传 所以我们 ...
- dev gridControl 自定义绘制列头颜色
1.添加事件CustomDrawColumnHeader private void gvw1_CustomDrawColumnHeader(object sender, DevExpress.Xtra ...
- Spring MVC基础学习
SpringMVC是Spring框架的一个模块,无需通过中间层整合在一起.SpringMVC是一个基于MVC设计模式web框架,MVC-model-view-controller:MVC将服务器端分为 ...
- leetcode 448. Find All Numbers Disappeared in an Array -easy (重要)
题目链接: https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/description/ 题目描述: Give ...
- 【django之Ajax】
一.Ajax的简介 1.定义 AJAX(Asynchronous Javascript And XML)翻译成中文就是"异步Javascript和XML",是一种创建交互式网页应用 ...
- 空间搜索(圆范围)中Geohash编码方案和网格编码方案对比探讨
文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.背景 多个项目中实现范围(圆)搜索的方案为:依赖库表中的X和Y字段构 ...