Install vsftpd

All commands should be run with ‘root’ user. Run the following command in terminal to install vsftpd package:

yum install vsftpd ftp -y

Configure vsftpd

Edit vsftpd configuration file /etc/vsftpd/vsftpd.conf,

vi /etc/vsftpd/vsftpd.conf

Find the following lines and make the changes as shown below:

 [...]
## Disable anonymous login ##
anonymous_enable=NO ## Uncomment ##
ascii_upload_enable=YES
ascii_download_enable=YES ## Uncomment - Enter your Welcome message - This is optional ##
ftpd_banner=Welcome to UNIXMEN FTP service. ## Add at the end of this  file ##
use_localtime=YES

Enable and start the vsftpd service:

systemctl enable vsftpd
systemctl start vsftpd

Firewall And SELinux Configuration

Allow the ftp service and port 21 via firewall.

firewall-cmd --permanent --add-port=21/tcp
firewall-cmd --permanent --add-service=ftp

Restart firewall:

firewall-cmd --reload

Then, update the SELinux boolean values for FTP service:

setsebool -P ftp_home_dir on

Create FTP users

By default, root user is not allowed to login to ftp server for security purpose. So, let us create a normal testing user called “sk” with password “centos”.

useradd sk
passwd sk

Connecting to FTP server

Now, try to connect to FTP server itself with user “sk”:

ftp 192.168.1.101

Enter the ftp user name and password.

Sample Output:

Connected to 192.168.1.101 (192.168.1.101).
220 Welcome to UNIXMEN FTP service.
Name (192.168.1.101:root): sk
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> 最后,如果出现500 OOPS: chroot的错误,说明系统中没有ftp_home_dir目录,那么需要用以下命令代替:
setsebool -P ftpd_full_access 1

如果出现ftp能连接,但是ls出现connect refuse的错误,需要将selinux关闭。修改方法为打开/etc/selinux/config文件,将SELINUX改为disabled即可。

CentOS 7: Install vsftpd的更多相关文章

  1. Install vsftpd on centos

    安装vsftpd程序. sudo yum -y install vsftpd 启动ftp服务. sudo service vsftp start 添加ftp用户,并设置密码. sudo useradd ...

  2. centos install vsftpd

    1.安装 #安装Vsftpd服务相关部件 yum -y install vsftpd* #确认安装PAM服务相关部件, 开发包,其实不装也没有关系,主要的目的是确认PAM. yum -y instal ...

  3. CentOS 7 install LNMP

    CentOS 7 install LNMP 关于 Nginx (发音 “engine x”)这是一款免费.开源.高效的 HTTP 服务器,Nginx是以稳定著称,丰富的功能,结构简单,低资源消耗.本教 ...

  4. CentOS下安装vsftpd

    因为FTP的端口是 两个,一个是固定21端口,还有一个任意端口的数据通道.关键是任意端口不好搞. 首先在vsftpd的配置文件中设置 任意端口的范围 [root@localhost root]# vi ...

  5. 【Linux笔记】CentOS yum 安装 vsftpd

    vsftpd是一款在Linux发行版中最受推崇的FTP服务器程序.特点是小巧轻快,安全易用,下面直接上干货. 一.安装vsftp 以管理员的身份使用yum命令安装vsftp: [root@localh ...

  6. CentOS 7 安装vsftpd 服务器

    在CentOS7上安装ftp服务器用于保存服务端上传的图片. 1.CentOS卸载vsftpd的方法 如果服务器上已经安装了vsftpd服务,配置出错需要卸载vsftpd服务. 1.1 查找vsftp ...

  7. CentOS配置FTP(VSFTPD)

    一.vsftp安装篇 # 安装vsftpd yum -y install vsftpd # 启动 service vsftpd start # 开启启动 chkconfig vsftpd on 二.v ...

  8. CentOS下安装vsftpd架设ftp服务器

    什么是vsftpd vsftpd是一款在Linux发行版中最受推崇的FTP服务器程序.特点是小巧轻快,安全易用. 首先安装vsftpd这个软件,命令是,yum install vsftpd servi ...

  9. centos source install

    CentOS Kernel Source Install Mar 12th, 2012 | Comments CentOS kernel source install, first off if yo ...

随机推荐

  1. 392 Is Subsequence 判断子序列

    给定字符串 s 和 t ,判断 s 是否为 t 的子序列.你可以认为 s 和 t 中仅包含英文小写字母.字符串 t 可能会很长(长度 ~= 500,000),而 s 是个短字符串(长度 <=10 ...

  2. [转]T4系列文章之3:T4语法的介绍

    本文转自:http://www.cnblogs.com/damonlan/archive/2012/03/06/2382724.html 因为这段时间一直都没空,我也不知道有没有对人T4感兴趣,但不管 ...

  3. css边框样式、边框配色、边框阴影、边框圆角、图片边框

     边框样式 点线式边框 破折线式边框 直线式边框 双线式边框 槽线式边框 脊线式边框 内嵌效果的边框 突起效果的边框 <div style="width: 300px; height: ...

  4. C++帮助文档(自己写的)

    以下所有记录几乎都是摘抄自<C++ primer 5th 中文> auto   类型说明符   P61 特点: 1.     定义的变量必须有初始值 2.     通过初始值来推算变量的类 ...

  5. JDBC更新10W级以上数据性能优化

    随笔缘由: 系统完成到一定程度,少不了要往数据库中添加大量数据进行性能测试. 我用程序做数据10W条,使用jdbc批更新的API,发现每次只能插入2W多条记录. 一番小小研究,觉得总结一下可能有些意义 ...

  6. linux free命令-显示内存的使用情况

    更多Linux 性能监测与优化 关注 Linux命令大全 free命令可以显示当前系统未使用的和已使用的内存数目,还可以显示被内核使用的内存缓冲区. 语法 free(选项) 选项 -b:以Byte为单 ...

  7. 关于一个css布局的小记录

    这里我们采用一种最简单的 方式,至少我目前认为最简单的方式,使用flex布局来实现 下面是html结构: <div class="box1"> <div clas ...

  8. 日期工具类 DateTools

    为了跟其他日期工具类进行区分起名字DateTools public class DateTools { /** The DAT e_ forma t1. */ public static String ...

  9. HTTP 请求的 GET 与 POST 方式的区别

    HTTP 请求的 GET 与 POST 方式的区别 在客户机和服务器之间进行请求-响应时,两种最常被用到的方法是:GET 和 POST. GET - 从指定的资源请求数据. POST - 向指定的资源 ...

  10. 九度oj 题目1089:数字反转

    题目1089:数字反转 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:3531 解决:1935 题目描述: 12翻一下是21,34翻一下是43,12+34是46,46翻一下是64,现在又任 ...