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 ...
随机推荐
- Windows聚焦转为图片
1.windows聚焦图片目录路径: C:\Users\Er\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1 ...
- DP找最优配置,(POJ1018)
题目链接:http://poj.org/problem?id=1018 这个DP,我的头都快晕了. dp[i][j]表示取到第i个设备,宽带为j时的最小价格. 状态转移方程: dp[i][k]=min ...
- AngularJS 控制器的方法
AngularJS 控制器也有方法(变量和函数) <!DOCTYPE html><html><head><meta http-equiv="Cont ...
- Vue nodejs商城项目-搭建express框架环境
1.express-project 搭建express框架环境 安装express generator生成器 通过生成器自动创建项目 配置分析 安装 cnpm i -g express-generat ...
- java mysql多次事务 模拟依据汇率转账,并存储转账信息 分层完成 dao层 service 层 client层 连接池使用C3p0 写入库使用DBUtils
Jar包使用,及层的划分 c3p0-config.xml <?xml version="1.0" encoding="UTF-8"?> <c3 ...
- 使用session处理用户搜索后数据的上一页和下一页跳转
搜索语句界面: /*单一检索:此处为一个下拉列表的检索*/ if(isset($_POST['submit']) && $_POST['submit'] == '点击搜索') { if ...
- 关于img底部空白
<img>元素底部为何有空白? 问题: 最近听网课遇到这样一个问题,先po出代码如下: <!--html--> <div class="top"> ...
- LeetCode426.Convert Binary Search Tree to Sorted Doubly Linked List
题目 Convert a BST to a sorted circular doubly-linked list in-place. Think of the left and right point ...
- Linux添加swap分区
swap分区的作用为当系统的物理内存不够用的时候,就需要将物理内存中的一部分空间释放出来,以供当前运行的程序使用,那些被释放的空间可能来自一些很长时间没有什么操作的程序,这些被释放的空间被临时保存到S ...
- nginx+php-fpm结构模型剖析及优化(转载)
一.nginx和php-fpm的关系和分工 nginx是web服务器,php-fpm是一个PHPFastCGI进程管理器,两者遵循fastcgi的协议进行通信,nginx负责静态类似html文件的处理 ...