RedHatEnterpriseLinuxServerRelease7.3上配置vsftpd服务器
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上配置vsftpd服务器的更多相关文章
- RedHatEnterpriseLinuxServerRelease7.3上配置vsftp服务器
1.vsftpd 服务启停相关命令 systemctl start vsftpd systemctl stop vsftpd systemctl restart vsftpd 2.配置文件/etc/v ...
- 在windwo server2008服务器上配置ftp服务器、及配置phpstrom工具、实现项目同步。
在windwo server2008服务器上配置ftp服务器.及配置phpstrom工具.实现项目同步. 在windwo server2008服务器上配置ftp服务器 参考该篇文章:http://bl ...
- (转载)在vmware中简单配置vsftpd服务器
(转载)http://blog.chinaunix.net/uid-7453676-id-2625582.html 分类: LINUX 一 试验的前期环境搭建 系统环境:Fedora 2 软件 ...
- 在Linux上配置vsftpd
一般安装好vsftpd这个服务,它的默认配置文件在这里:/etc/vsftpd/vsftpd.conf 用vim在里面可以添加一些变量控制权限之类的.还有很多chroot相关的东西,里面的变量都有作用 ...
- centos7配置vsftpd服务器
参考网站:https://blog.csdn.net/lianghongge/article/details/78209445 ==================================== ...
- 使用postfix在debian上配置邮件服务器
如果debian中安装了exim4,先卸载exim4: apt-get remove exim4 安装postfix apt-get install postfix 安装完成后就可以测试下,PHP代码 ...
- 阿里云上 配置 vsftpd 配置文件 (一个成功例子)
# # READ THIS: This example file is NOT an exhaustive list of vsftpd options. # Please read the vsft ...
- 如何配置vsftpd服务器
1,通过yum查看本地是否存在vsftpd rpm -qa|grep vsftpd [root@node2 ~]# rpm -qa |grep vsftpdvsftpd-3.0.2-25.el7.x8 ...
- 四条命令快速在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 ...
随机推荐
- Ehcache的配置与使用
Ehcache是JAVA内制的一个缓存框架! 目的:缓解频繁读取数据库的压力; 初步配置如下: <?xml version="1.0" encoding="UTF- ...
- 使用dao时,如何同时使用动态表名和过滤字段?
使用dao时,如何同时使用动态表名和过滤字段? 发布于 630天前 作者 wukonggg 316 次浏览 复制 上一个帖子 下一个帖子 标签: 无 如题.求样例代码 1 回复 wend ...
- 使用selenium grid分布式执行之一
目前ui框架会做一个更新,把原有的Jenkins分布式方式换成grid方式,换成grid方式有两个好处,1.grid的资源占用比Jenkins的jnlp占用资源少 2.grid可控制不同浏览器同时跑 ...
- POJ-1422 Air Raid---二分图匹配&最小路径覆盖
题目链接: https://vjudge.net/problem/POJ-1422 题目大意: 有n个点和m条有向边,现在要在点上放一些伞兵,然后伞兵沿着图走,直到不能走为止 每条边只能是一个伞兵走过 ...
- 【UOJ83】【UR #7】水题出题人(提交答案题)
点此看题面 大致题意: 给你若干份排序的代码,共\(6\)个子任务,每个子任务让你构造数据使得一份代码用时在给定的\(T\)以内,另一份代码用时超过\(2000000\). 子任务\(1\):归并排序 ...
- Scrivener 中文语言包
Scrivener 中文语言包 随着OS X EI Capitan的发布,Scrivener 也升级到了2.7,程序没有大的变化,主要是为了兼容10.11并更新了图标. 原来的2.6的中文语言包无法在 ...
- 一、初始Object-C
一.OC概述 特点: 1没有包得概念 2关键字以@开头 3.拓展名 .m 二.第一个OC类 1,分为2个文件..m和.h文件 2. .m文件用来实现类 .h用来定义声明类 .h文件中得写法 //@i ...
- 统一项目中编码风格(Eclipse Java code format、codetemplate)
在公司内的日常开发过程中,除了需要遵守统一的编码规范之外,还需要对编写的代码做统一的格式化,Eclipse提供了格式化编码的工具,快捷键是:Ctrl+Shift+F. 为了统一项目组的代码风格,建议使 ...
- 第一个C#程序Hello World
一.编写第一个C#程序——Hello World1. 启动Microsoft Visual Studio 2010.2. 点击“文件”菜单,选择“新建”项,在弹出的子菜单中选择“项目”命令.3. 弹出 ...
- 批量删除xml文件中的<?xml version="1.0" ?>
#!/bin/shcd 'home/usrname/'ls cd '/home/usrname/VOC2007/Annotations/' for file in `ls /home/usrname/ ...