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. (分享) git详解

    今天学了下git  http://blog.jobbole.com/78960/   他写的超级好的 之前也弄过,在eclipse上有个关于github的一个插件,可以通过github的仓库地址把ec ...

  2. LRU算法

    LRU,Least recently used[最近最少使用算法],该算法[或变种]被广泛用于缓存管理中,其设计思想是基于:经常被访问的数据在未来一段时间也会被访问,最近最少被访问的数据在未来一段时间 ...

  3. http协议和web应用有状态和无状态浅析

    http协议和web应用有状态和无状态浅析 (2013-10-14 10:38:06) 转载▼ 标签: it   我们通常说的web应用程序的无状态性的含义是什么呢? 直观的说,“每次的请求都是独立的 ...

  4. eclipse 搭建python环境

    1.安装eclipse + jdk windows下面就直接下载,双击安装就完了. Linux下: 安装eclipse: 安装完之后,可直接运行eclipse: 快捷方式在: 安装jidk:   2. ...

  5. sql server 日期

    在SQL Server数据库中,SQL Server日期时间格式转换字符串可以改变SQL Server日期和时间的格式,是每个SQL数据库用户都应该掌握的.本文我们主要就介绍一下SQL Server日 ...

  6. [笔记]HTML

    链接 <a href="链接地址">链接显示名</a> <a name="C4">target</a> < ...

  7. java中的final的使用

    1.final类不能被继承,因此final类的成员方法没有机会被覆盖,默认都是final的.在设计类时候,如果这个类不需要有子类,类的实现细节不允许改变,并且确信这个类不会再被扩展,那么就设计为fin ...

  8. 将android模拟器上的db文件拷贝到电脑上

    1. db文件在android手机中的存储地址一般都是/data/data/packname/databases/db_file. 2.打开cmd,运行 adb shell ,使用root权限 3.通 ...

  9. StringEscapeUtils类的转义与反转义方法

    第一步.下载Jar包(commons-lang.jar) 下载地址:http://commons.apache.org/proper/commons-lang/download_lang.cgi 第二 ...

  10. Hdu 3564 Another LIS 线段树+LIS

    Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission( ...