Centos 7 linux System Default ftp installation configuration and deployment (detailed description), centos installation Configuration

Source: Internet
Author: User
Tags ftp connection

Centos 7 linux System Default ftp installation configuration and deployment (detailed description), centos installation Configuration

It took a long time for the minor to contact the Linux system and wanted to solve the problem of ftp installation and deployment in the linux system.
The configuration methods of experts have been integrated. If anything is wrong, you are welcome to correct me. Thank you!

I. Statement:

This document uses the operating system version Centos 7 Linux
Source: CentOS-7-x86_64-DVD-1708.iso
Official Website: http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1708.iso
Installation package selection: minimum installation package
None. Only root users are allowed.

Ii. Install vsftpd

  2.1 check whether vsftpd is installed in the system 
Method 1: [root @ localhost ~] # Rpm-q vsftpd
Method 2: [root @ localhost ~] # Vsftpd-v
 2.2 install vsftpd:
[Root @ localhost ~] # Yum-y install vsftpd
 2.3 view the vsftpd installation location:
[Root @ localhost ~] # Whereis vsftpd

Iii. Start vsftpd

Start: [root @ localhost ~] # Systemctl start vsftpd. service
Set auto-start upon startup: [root @ localhost ~] # Systemctl enable vsftpd. service

Iv. Configuration File

 4.1 configuration file/etc/vsftpd. conf

Anonymous_enable = NO # anonymous access is not allowed. Anonymous logon is disabled.
Chroot_local_user = YES # enable restrict users in their home directory
Use_localtime = YES # when using a local machine (add it by yourself)
Chroot_list_enable = YES
Local_enable = YES # allow FTP user logon verification using a local account
Allow_writeable_chroot = YES # If this configuration is enabled for the user in the main directory, the error 500 OOPS: vsftpd: refusing to run with writable root inside chroot () is returned ()
Xferlog_enable = YES # enable the log upload and download functions, which is enabled by default.
Local_umask = 022 # Set the local user's default file mask 022
# FTP local File Permission. The default value is 077, but the default value is 022 in the configuration file after vsftpd is installed.

-Note: If the vsftpd configuration file is modified, restart vsftpd: systemctl restart vsftpd. service.

4.2 firewall settings

Use the dos window to ping the linux I address
If the connection is successful, the ftp link is successful. Generally, the system firewall is enabled when the first configuration is successful. Therefore, you need to disable the firewall or set the firewall configuration.

View the Firewall Status:
[Root @ localhost ~] # Systemctl status firewalld. service

In general, if the external connection to vsftp is not available, it is likely that the firewall is working.

Enable Firewall:
[Root @ localhost ~] # Systemctl start firewalld. service
Disable Firewall:
[Root @ localhost ~] # Systemctl stop firewalld. service
Restart Firewall:
[Root @ localhost ~] # Systemctl restart firewalld. service
Disable startup:
[Root @ localhost ~] # Systemctl disable firewalld. service
Enable startup:
[Root @ localhost ~] # Systemctl enable firewalld. service

Note: If you do not want to disable the firewall, you need to add the FTP service to the firewall.
Firewall-cmd -- permanent -- zone = public -- add-service = ftp
Firewall-cmd -- reload

4.3 FAQs about ftp connections

If the directory list cannot be accessed during ftp connection:
View the Selinux status of ftp:
[Root @ localhost ~] # Sestatus-B | grep ftp
Change the status to on:
[Root @ localhost ~] # Setsebool-P rftp_home_dir on (Note: P is capitalized)
[Root @ localhost ~] # Setsebool-P ftpd_full_access on (Note: P is capitalized)

Related Article

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.