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 ...
随机推荐
- April 12 2017 Week 15 Wednesday
Genius often betrays itself into great errors. 天才常被天才误. Genius can help us get greater achievements, ...
- leetcode: 链表2
1. copy-list-with-random-pointer(拷贝一个带随机指针的链表) A linked list is given such that each node contains a ...
- SAP Fiori里的List是如何做到懒加载Lazy load的
今天一同事问我这个问题:S/4HANA Fiori应用里的列表,一旦Scroll到底部就会自动向后台发起新的请求把更多的数据读取到前台显示. 以Product Master这个应用为例,我点击搜索之后 ...
- 2018.8.5 Bootstrap 使用
Bootstrap的环境搭建 <link rel="stylesheet" type="text/css" href="css/bootstra ...
- 用蒙特卡洛方法计算派-python和R语言
用蒙特卡洛方法算pi-基于python和R语言 最近follow了MOOC上一门python课,开始学Python.同时,买来了概率论与数理统计,准备自学一下统计.(因为被鄙视过不是统计专业却想搞数据 ...
- 第17章 EXTI—外部中断/事件控制器—零死角玩转STM32-F429系列
第17章 EXTI—外部中断/事件控制器 全套200集视频教程和1000页PDF教程请到秉火论坛下载:www.firebbs.cn 野火视频教程优酷观看网址:http://i.youku.co ...
- JavaScript的执行机制
JavaScript是单线程的,任务的执行时自上而下的,这就有了一个问题,当遇到一个比较耗时的任务时,下面的代码就会被阻塞,这就意味着卡死.所以js是有异步的,它的实现主要是通过事件循环(event ...
- Python 初始—(装饰器)
本质上也是函数的另一种表现形式,为其它函数丰富其功能,装饰其他函数,附加功能 在不改变被装饰的函数的源代码,而且不改变被装饰的函数的调用方式,因此被装饰的函数感知不到装饰器函数的存在 分解装饰器 函数 ...
- 利用deadline_timer实现定时器Timer
// 类似QTimer的定时器 class Timer { typedef void(* handler)(); public: Timer() : m_millseconds() , m_timer ...
- 【思维题 细节】loj#6042. 「雅礼集训 2017 Day7」跳蚤王国的宰相
挂于±1的细节…… 题目描述 跳蚤王国爆发了一场动乱,国王在镇压动乱的同时,需要在跳蚤国地方钦定一个人来做宰相. 由于当时形势的复杂性,很多跳蚤都并不想去做一个傀儡宰相,带着宰相的帽子,最后还冒着被打 ...