Install vsftpd in CentOS7

Source: Internet
Author: User
0. first install ftp service yuminstall-yftp1. install vsftp2via yuminstall-yvsftp. modify vi/etc/vsftpd. conf and open chroot_list_enabled = yes, chroot_list_file =/etc/vsftpd/chroot_list

0. first install the ftp service

Yum install-y ftp

1. install vsftp through yum install-y vsftp

2. modify vi/etc/vsftpd. conf, enable chroot_list_enabled = yes, and enable chroot_list_file =/etc/vsftpd/chroot_list.

Then touch/etc/vsftpd/chroot_list to add the user

3. create an ftp User:

Useradd-d/home/ftp-g ftp-s/sbin/nologin ftptest

Passwd ftptest

4. firewall needs to be configured

 

 

Open the/etc/sysconfig/iptables file

Vi/etc/sysconfig/iptables

Add the following code before the REJECT line:

-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 21-j ACCEPT

Then restart the firewall. because the CentOS firewall command has been changed to firewalld, the command has been changed:

Service firewalld start/restart/stop

5. authorize chmod 777/home/ftp/* to/home/ftp /*

Cancel the root directory permission chmod a-w/home/ftp

PS: disable the SELinux method

# Vi/etc/selinux/config

Set SELINUX = XXX --> XXX to the level

Change

SELINUX = disabled

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.