This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12342|Reply: 0

[FTP] CentOS installs VSFTP service

[Copy link]
Posted on 10/16/2016 1:27:22 PM | | | |

1. Update the yum source

I updated it directly with yum update

2. Install vsftp

Use the yum command to install vsftpd


3. Add the FTP account and directory

Check the location of the nologin first, usually under /usr/sbin/nologin or /sbin/nologin.

Create an account using the following command, which specifies /www/wwwroot as the home directory of the user pwftp, and you can define the account name and directory yourself:


To change the password for the account:


Modify permissions for a specified directory

#chown -R pwftp:pwftp /www/wwwroot
4. Configure vsftp

Edit the vsftpd configuration file with the following command:

#vi /etc/vsftpd/vsftpd.conf
Replace "anonymous_enable=YES" in the configuration file with "anonymous_enable=NO"

Remove the comment symbol before the following configuration:

local_enable=YES
write_enable=YES
chroot_local_user=YES

Save the modification, press the ESC key, and enter: wq

5. Modify the shell configuration

viEdit /etc/shells, and add /usr/sbin/nologin or /sbin/nologin (depending on the current system configuration) in the file

6. Start the vsftp service and test the login

Start the vsftpd service with the command:

#service vsftpd start
Then use the account pwftp to test whether you can log in to FTP. The directory is /www/wwwroot.

Here I log in directly with the client software FileZilla Client, and it has been tested, and it is completely correct.
7. Start the configuration

# Start the configuration
chkconfig --list vsftpd
# If it is full off, manually set 0:off 1:off 2:off 3:off 4:off 5:off 6:off
chkconfig --level 2345 vsftpd on





Previous:Install VSFTP process organization
Next:Solved the garbled Chinese file name of centos
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com