1. install vsftpd.(PS:procedure 1-4 under the circumstance that the firewall is closed and the iptables is inactive)

 # install vsftpd
sudo yum install vsftpd
# start vsftpd
sudo systemctl start vsftpd.service
# start automatic after rebooting

2.configurations about vsftpd.

 sudo vim /etc/vsftpd/vsftpd.conf

 ###The following key-values is specially listed####
anonymous_enable=NO
dirmessage_enable=YES
local_umask=
xferlog_enable=YES
ftpd_banner="welcome messages"
data_connection_timeout= # restart vsftpd service
sudo systemctl restart vsftpd.service

3.create ftp user

 sudo useradd -s /sbin/nologin netlab
sudo passwd netlab
sudo chmod -R /home/netlab

4.limit the user to the root directory

# revise the configuration of vsftpd
sudo vim /etc/vsftpd/vsftpd.conf #####Special items###########
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
allow_writeable_chroot=YES # create a file. Otherwise, it would be wrong.
sudo touch /etc/vsftpd/chroot_list # restart the service
sudo systemctl restart vsftpd.service

5.about the firewall

open the port to allow the application to use the port.

e.g.,

-A INPUT -m state –state NEW -m tcp -p tcp –dport 21 -j ACCEPT

CentOS - FTP server的更多相关文章

  1. Setup FTP Server On CentOS, RHEL, Scientific Linux 6.5/6.4/6.3

    setsebool allow_ftpd_full_access onsetsebool -P ftp_home_dir on vsftpd (Very Secure File Transport P ...

  2. centos 安装FTP server详情(转)

    centos 安装FTP server详情 分类: linux 2013-12-27 16:45 227人阅读 评论(0) 收藏 举报 我们这里以安装vsftpd 服务器端为例子: 1.进入到cent ...

  3. setup FTP server on CentOS 7

    Setup FTP Server on CentOS 7 Install vsftpd vsftpd (Very Secure File Transport Protocol Daemon) is a ...

  4. Centos下ftp协议连接远程ftp server主机

    环境说明 [root@Check3 ~]# cat /etc/redhat-release CentOS release 6.9 (Final) [root@Check3 ~]# uname -a L ...

  5. CentOS7搭建FTP Server

    本文主要记录CentOS下FTP Server的安装和配置流程. 安装vsftpd yum install -y vsftpd 启动vsftpd service vsftpd start 运行下面的命 ...

  6. Guidance of Set up FTP Server

    Step 1. Create a FTP folder in your C disk, named "FTPReport"(an example) Step 2. Install ...

  7. How to set up an FTP server on Ubuntu 14.04

    How to set up an FTP server on Ubuntu 14.04 Setting up a fully-functional and highly secure FTP serv ...

  8. CentOS FTP基于虚拟用户的配置

    详细可以看:http://www.linuxidc.com/Linux/2013-12/94242.htm 所谓虚拟用户就是没有使用真实的帐户,只是通过映射到真实帐户和设置权限的目的.虚拟用户不能登录 ...

  9. 多线程查询FTP Server上的文件

    情形是这样的,最近做一个自动化的项目,当batch跑成功了,FTP Server上会有特定的生成文件.但是不确定是什么时候会有,大概是batch跑完了5分钟之内吧,所以在脚本里设置检查点的时候,需要每 ...

随机推荐

  1. href使用 javascript:;与javascript:void(0)防跳到顶部

    有时候我们在编写js过程中,需要触发事件而不需要返回值,那么就可能需要这样的写法   href=”#”,包含了一个位置信息.默认的锚是#top,也就是网页的上端,当连续快速点击此链接时会导致浏览器巨慢 ...

  2. jsf初学解决faces 中文输入乱码问题

    中文乱码,貌似在java里很常见,请看简单代码: 很简单的faces <div class="td-block"> <h:outputLabel class=&q ...

  3. 对DIP IoC DI的理解与运用

    DIP,IoC,DI基本概念 依赖倒置原则(DIP,Dependency Inverse Principle):强调系统的“高层组件”不应当依赖于“底层组件”,并且不论是“高层组件”还是“底层组件”都 ...

  4. Ubuntu菜鸟入门(三)—— 无用软件卸载,wps等常用软件安装

    一  移除不需要的软件 sudo apt-get remove libreoffice-common sudo apt-get remove unity-webapps-common sudo apt ...

  5. zookeeper原理及作用

    ZooKeeper是Hadoop Ecosystem中非常重要的组件,它的主要功能是为分布式系统提供一致性协调(Coordination)服务,与之对应的Google的类似服务叫Chubby.今天这篇 ...

  6. Appium中部分api的使用方法

    使用的语言是java,appium的版本是1.3.4,java-client的版本是java-client-2.1.0,建议多参考java-client-2.1.0-javadoc. 1.使用Andr ...

  7. iOS __weak __strong WeakSelf StrongSelf

    在block中常常会用到self,可是会造成循环引用.这时候就需要这样来解决这个问题: #define WeakSelf __weak typeof(self) weakSelf = self #de ...

  8. 怎样上传网页到ftp中

    1.下载filezilla软件软件并安装 打开刚刚装好的FileZilla,点击菜单中的"文件"             2.点击站点管理器 3.点击新站点

  9. Android的5大组件

    1. Activity组件 Activity组件通常的表现形式是一个单独的界面(screen).每个Activity都是一个单独的类,它扩展实现了Activity基础类.这个类显示为一个由Views组 ...

  10. [Python学习] python 科学计算库NumPy—矩阵运算

    NumPy库的核心是矩阵及其运算. 使用array()函数可以将python的array_like数据转变成数组形式,使用matrix()函数转变成矩阵形式. 基于习惯,在实际使用中较常用array而 ...