Installing vsftpd on alicloud CentOS system in Yum mode


Install vsftp

Install vsftp using Yum command

[[email protected] ~]# yum install vsftpd -y

Add FTP account and directory

First check the location of nologin, usually under / usr / SBIN / nologin or / SBIN / nologin.

Use the following command to create an account, which specifies / home / wwwroot as the root directory of user test. You can define the account name and directory yourself:

[[email protected] ~]# useradd -d /home/wwwroot -s /sbin/nologin test

To change this account password:

[[email protected] ~]# passwd test

Modify the permissions of the specified directory

[[email protected] ~]# chown -R test.test /home/wwwroot

Configure vsftp

Edit the vsftp configuration file as follows:

[[email protected] ~]# vi /etc/vsftpd/vsftpd.conf

Set “anonymous” in the configuration file_ Change “enable = yes” to “anonymous”_ enable=NO”

Cancel the comment symbol before the following configuration:

local_enable=YES write_enable=YES chroot_local_user=YES

Save the changes, press ESC key, and enter: WQ

If there is no “chroot” in the configuration file_ local_ User = yes “, enter the following command and press enter

[[email protected] ~]# echo ‘chroot_local_user=YES’ >> /etc/vsftpd/vsftpd.conf

Modify shell configuration

VI edit / etc / shells. If there is no / usr / SBIN / nologin or / SBIN / nologin (depending on the current system configuration), append it

Start the vsftp service and test the login

Use the command to start the vsftp service

[[email protected] ~]# service vsftpd start

Then test whether FTP can be logged in with the account test. The directory is / home / wwwroot.

The above is the method of installing vsftpd in the yum mode of Alibaba cloud CentOS system introduced by Xiaobian. I hope it will be helpful to you. If you have any questions, please leave me a message, and the editor will reply to you in time. Thank you very much for your support to the developeppaer website!