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. 自己总结SVN必知点

    1.只有添加或删除文件,才与xcodeproj文件有关 2.本地新建文件,为未知文件,符号为问号?,添加文件先add为A文件后,再commit         3.删除文件为叹号,右键删除为D,删除本 ...

  2. Huffman Tree

    哈夫曼(Huffman)树又称最优二叉树.它是一种带权路径长度最短的树,应用非常广泛. 关于Huffman Tree会涉及到下面的一些概念: 1. 路径和路径长度路径是指在树中从一个结点到另一个结点所 ...

  3. [Android Pro] PullToRefreshListView怎么设置各个item之间的间距

    reference to :  http://blog.csdn.net/qq_25943493/article/details/50923895 要设置第三方的上拉下载listView的item之间 ...

  4. js生成带参的二维码

    最近项目中有需求生成带参的二维码,考虑过用JAVA后台生成返回前端展示,后面了解到用jquery的qrcode.js插件可以很好现实 引入js: require.config({ baseUrl : ...

  5. 在注册表中无Python3.5安装路径的情况下安装pywin32-

    当安装pywin32出现Python Version 3.5 required which was not found in the registry的时候表面注册表中没有Python3.5的安装路径 ...

  6. Could not open Selected VM debug port (8700) (转)

    Could not open Selected VM debug port (8700) 2014年11月14日 ⁄ 综合 ⁄ 共 446字 ⁄ 字号 小 中 大 ⁄ 评论关闭   在运行项目的时候, ...

  7. mysql数据库链接与创建

    有童鞋问到说,环境搭建好了,mysql也安装了,但是就是进不去数据库,也启动不了,一直报错,那么下面这边就说下如何用Navicat链接上创建的数据库 首先 1)在xshell里进入mysql,命令是: ...

  8. MyBatis - MyBatis使用log4j2显示sql和结果集

    mybatis-config.xml <settings> <setting name="logImpl" value="LOG4J2" /& ...

  9. ZXing生成二维码

    dll:http://files.cnblogs.com/files/jake-ge/ZXing.rar 引入命名空间 using System.Drawing;using System.IO;usi ...

  10. to_string()的应用

    作用是将数字转化为字符串 #include<iostream> #include<cmath> #include<algorithm> #include<cs ...