Home>Article>Operation and Maintenance> How to set up ftp server under centos7

How to set up ftp server under centos7

王林
王林 Original
2020-05-22 10:26:18 3923browse

How to set up ftp server under centos7

1. Install the vsftpd ftp server software. The command is as follows:

yum install -y vsftpd

2. Set the vsftpd service to start automatically at boot, then restart the service and view ftp Service port, the command is as follows:

#chkconfig vsftpd on #systemctl enabled vsftpd.service #systemctl restart vsftpd.service #netstat -antup|grep ftp

After the installation is completed, you need to restart the vsftpd service.

3. Edit vsftpd main configuration file /etc/vsftpd/vsftpd.conf

Modify anonymous_enable = NO, which will disable anonymous login.

Remove the comment before chroot_local_user = yes to restrict users from accessing places outside the home directory.

4. Create an ftp user, set the user to be unable to log in to the server system and the home directory is under /var/www/html

How to set up ftp server under centos7

5. Modify it for others Permissions of the folder: chmod o w /var/www/html/

How to set up ftp server under centos7

6. Turn off selinux

vi /etc/selinux/config

How to set up ftp server under centos7

Restart the system.

Try to access it yourself within the system, ftp ip address, you should be able to log in successfully, continue to configure external network access

How to set up ftp server under centos7

7. Turn off the firewall

systemctl stop firewalld.service

Recommended tutorial:centos tutorial

The above is the detailed content of How to set up ftp server under centos7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn