Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Centos configure vsftpd, add users

Shulou Source: shulou.com Published: 2022-06-01 04:35:39 10月05日 Update

Environment introduction

CentOS 6.6

Install vsftpd

Yum-y install vsftpd

View the installation package

Rpm-Q vsftpd

Modify configuration file / etc/vsftpd/vsftpd.conf

Anonymous_enable=NO # turn off anonymous users

Ascii_upload_enable=YES

Ascii_download_enable=YES

Userlist_deny=NO # this line needs to be added manually

Add ftp user

Adduser-g ftp-d / var/ftp ftpuser # username ftpuser,ftp directory is specified as / var/ftp, if not specified, the default directory is the user's home directory / home/ftpuser

Passwd ftpuser # set user password

Modify the file / etc/vsftpd/user_list, clear the file, and add the newly created ftp user

Ftpuser

Configure the firewall to allow FTP services

The configuration of vsftpd is complete, but when the client accesses the ftp server, a 500 OOPS:cannot change directory error occurs.

This is because SELinux is installed on the CentOS system, and FTP is not enabled by default, so access is blocked.

View the settings for SELinux

Getsebool-a | grep ftp

Ftp_home_dir-- > off

Turn on ftp_home_dir status

Setsebool ftp_home_dir 1

Open the vsftpd service

Service vsftpd restart

Boot self-start

Chkconfig vsftpd on

Client access

Ftp://ftpserverip

Tags: User configuration file directory service customer client rule password manual server status environment user name system this is error firewall support fire prevention Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Tech Info MySQL NVidia Shulou Information