Home > System Tutorial > LINUX > Specific method to install vsftpd on Centos7

Specific method to install vsftpd on Centos7

王林
Release: 2024-04-10 09:07:14
forward
542 people have browsed it

Centos7安装vsftpd 的具体方法

1. Install vsftpd through yum
yum install -y vsftpd
Copy after login
2. Modify the configuration file of vsftpd
vi /etc/vsftpd/vsftpd.conf
Copy after login

Modify the configuration file as follows:

1.Anonymous access is not allowed
anonymous_enable=NO
Copy after login
2. Allow the use of local accounts for FTP user login verification
local_enable=YES
Copy after login
3. Prevent users from leaving the home directory

When chroot_list_enable=YES, chroot_local_user=YES, users listed in the /etc/vsftpd.chroot_list file can switch to other directories; users not listed in the file cannot switch to other directories.

chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
Copy after login

Add

at the end of the configuration file
allow_writeable_chroot=YES
Copy after login

Otherwise an error will be reported

500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Copy after login

If /etc/vsftpd/chroot_list does not exist, you need to create this file

vi /etc/vsftpd/chroot_list
Copy after login

:wq Just save and exit.

4. Set the upload and download functions to support ASCII mode.
ascii_upload_enable=YES
ascii_download_enable=YES
Copy after login

Finally: wq save changes and restart vsftpd

systemctl restart vsftpd.service
Copy after login
3. Create a new FTP user
useradd -d /var/ftp/public_root -g ftp -s /sbin/nologin ftpuser
Copy after login

Change the FTP user password

passwd ftpuser
Copy after login

The above is the detailed content of Specific method to install vsftpd on Centos7. For more information, please follow other related articles on the PHP Chinese website!

source:linuxprobe.com
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