Home > System Tutorial > LINUX > How to set up FTP on the server in CentOS7.2?

How to set up FTP on the server in CentOS7.2?

王林
Release: 2024-01-06 18:14:21
forward
848 people have browsed it

Currently, most of the FTP servers deployed in Linux are vsftpd. As for why, there is no need to delve into it for the time being.

1. Install vsftpd

# yum check-update
# yum -y install vsftpd
Copy after login

2. Configuration parameters

# vi /etc/vsftpd/vsftpd.conf
Copy after login

Modify to the following parameters

anonymous_enable=NO
chroot_local_user=YES
allow_writeable_chroot=YES
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=40100
Copy after login

3. Restart ftp

# systemctl restart vsftpd.service
# systemctl enable vsftpd.service
Copy after login

4. Modify firewall configuration

# firewall-cmd --permanent --add-service=ftp
# firewall-cmd --reload
# setsebool -P ftp_home_dir on
Copy after login

5. Create a user test1 for ftp (the specified directory is /home/www, remote login shell is not allowed)

# useradd -d /home/www -m test1 -s /sbin/nologin
Copy after login

6.Set a password for the ftp user

# passwd test1
Copy after login

The above is the detailed content of How to set up FTP on the server in CentOS7.2?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template