CENTOS7 Open VSFTPD

Source: Internet
Author: User

Centos

1. Open DNS can be yum install (Close after operation)

# vi/etc/resolv.conf
# (INSERT) nameserver 8.8.8.8
# (insert) means pressing the INSERT key and entering the following characters
# (ESC): Wq

2, installation vsftpd

# yum Install vsftpd

3. Start the service

#systemctl Start Vsftpd.service

4. Check boot start

# Systemctl List-unit-files | grep enabled

# If it's not enabled, start it like this

#systemctl Enable httpd

5. Add a Htmler account to the root group for FTP to/var/www/html and give it a password

# useradd-g root-m-d/var/www/html-s/sbin/nologin Htmler

# passwd Htmler

# Enter password

6, the ownership of/var/www/html to htmler.root

# Chown-r Htmler.root/var/www/html

7, configure vsftpd, prohibit anonymous user login

# vi/etc/vsftpd/vsftpd.conf

# (INSERT) Anonymous_enable=yes to anonymous_enable=no

# (ESC): Wq

8. Configuring Firewalls and SELinux

# firewall-cmd--permanent--zone=public--add-service=ftp

9.# Reload

# Firewall-cmd--reload

Tofind ftp -related SELinux bool values for FTP Access release

# Getsebool-a | grep FTP

# setsebool-p Ftpd_full_access on

#-P writes to disk, does not restart disappears, but takes longer and waits patiently, this is the last step

If the file server can upload ftp , but the PHP code remote FTP driver upload image is empty, then turn off SELinux! No, why not! :
1,. View SELinux Status

/usr/sbin/sestatus

2,. Close SELinux

/usr/sbin/setenforce 0 Close now

Vi/etc/sysconfig/selinux Modify configuration file, reboot only takes effect

Selinux=disabled

Dredge

CENTOS7 Open VSFTPD

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.