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. 腾讯QQ形象18年变迁史,最早的QQ企鹅形象居然长这样!

    1999年,腾讯创建之初,这是当时QQ的形象,现在看起来很滑稽,又高又瘦.当时公司并没有专职的设计师,所以这个形象就凑合着用了. 后来,腾讯也觉着上一个形象做的不是特别好,于是在2000年的时候,公司 ...

  2. YII的Modules模块化

    转载来源: http://blog.csdn.net/mengxiangbaidu/article/details/7041296 http://blog.csdn.net/colzer/articl ...

  3. Mybatis 使用maven插件mybatis-generator自动生成entities和SQL和mapper

    第一步:在pom中添加该插件的配置,我直接把pom贴上来好了 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns ...

  4. js实现去重字符串

    实现去重字符串主要是把重复的字符与原来的字符(先push()进入一个数组存起来)相匹配,如果match返回的不是null则说明重复,就删除掉: <script> var str = pro ...

  5. 1.0 Quartz 2D 简介

    本文并非最终版本,如有更新或更正会第一时间置顶,联系方式详见文末 如果觉得本文内容过长,请前往本人 “简书”   Quartz2D须知:   (1)Quartz 2D是苹果官方的二维绘图引擎,同时支持 ...

  6. 畅通工程[HDU1863]

    畅通工程 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submissio ...

  7. linux install matlab2014a

    https://pan.baidu.com/s/1qYJ9tNm#list/path=%2F下载镜像文件 2#开始安装,全程最好断网 sudo mkdir /media/matlab sudo mou ...

  8. *HDU3172 并查集

    Virtual Friends Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)T ...

  9. MySQL 高可用架构之MMM

    简介 MMM(Master-Master replication manager for MySQL)是一套支持双主故障切换和双主日常管理的脚本程序.MMM使用Perl语言开发,主要用来监控和管理My ...

  10. char和byte的区别

    char的字符数据类型,是无符号型的,占2个字节:大小范围是0-65535: byte是字节数据类型,是有符号型的,占1个字节:大小范围为-128-127: 1, char c1=3; char c= ...