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之路——初识函数
阅读目录 为什么要用函数 函数的定义与调用 函数的返回值 函数的参数 本章小结 返回顶部 为什么要用函数 现在python届发生了一个大事件,len方法突然不能直接用了... 然后现在有一个需求,让你 ...
- python/Djangof分页与自定义分页
python/Djangof分页与自定义分页 Django分页 ##============================================分页==================== ...
- Debian8搭建LEMP环境
LEMP环境指的是Linux+Nginx+MariaDB+PHP 这里我选择的版本是最新的MariaDB和PHP7 安装Nginx 相对于Apache,Nginx是一个轻量级的高性能web服务器并在近 ...
- 关于tr069网管开发系列教程
原创作品,转载请注明出处,严禁非法转载.如有错误,请留言! email:40879506@qq.com 声明:本系列涉及的开源程序代码学习和研究,严禁用于商业目的. 如有任何问题,欢迎和我交流.(企鹅 ...
- AWS stolen CPU
故事的开头是这样的: 一天我正在吃饭,突然就收到了服务器告警(cpu high load),吓的我饭也没吃好,只吃了三碗就回去处理故障了,我在监控上看到了这样子的图: 看见了吧,吃饭那段时间cpu一下 ...
- Delphi 10.2.3 + Xcode 9.2 开发 IOS 程序,免证书+免越狱,真机调试
工具列表: 1,delphi 10.2.3 + PAServer19.0. 2,配置好一些的 PC 一台,建议至少 4 代 intel i5 + 16G + 256GSSD,低于此配置将产生拖延症. ...
- C#在使用Assembly加载程序集时失败
错误现象: 进行插件读取时出现错误:"尝试从一个网络位置加载程序集,在早期版本的 .NET Framework 中,这会导致对该程序集进行沙盒处理.此发行版的 .NET Framework ...
- [LeetCode] Number of Distinct Islands II 不同岛屿的个数之二
Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) conn ...
- Log4j1.2配置详解
Log4j是Apache的一个开源项目,通过使用Log4j,我们可以控制日志的输出到控制台,或者文件等等. 同时,在各大框架中也主要是使用log4j来进行日志的输出. 下面是log4j1.x版本的详细 ...
- poj 2888 Magic Bracelet(Polya+矩阵快速幂)
Magic Bracelet Time Limit: 2000MS Memory Limit: 131072K Total Submissions: 4990 Accepted: 1610 D ...