Alibaba Cloud Linux FTP server configuration

  
        Alibaba Cloud Server is the best cloud server in China at present, but the price is also relatively expensive. Below we will introduce you to the FTP server configuration under Alibaba Cloud Linux. The method is not much different from the ftp server under Linux. Just a few small details.
First, aliyun Linux (Redhat) install vsftp software
1. Update yum source
First need to update the system yum source, convenient tool download address: update_source.zip. It should be noted that the current file cannot be transferred, so you want to run update_source.sh and you can only open it with text, copy and paste it to the Alibaba Cloud server system.
2. Install vsftp
Use yum command to install vsftp
#yum install vsftpd -y
3. Add ftp account and directory
Check the location of nologin first, usually in /usr/sbin /nologin or /sbin/nologin.
Use the following command to create an account that specifies /ftp as the home directory for user test. You can define your own account name and directory:
#useradd -d /ftp -s /sbin/nologin test
Modify the account password:
#passwd test
Modify the permissions of the specified directory
#chown -R test:test /ftp
4. Configure vsftp
Edit the vsftp configuration file, the command is as follows: Br> #vi /etc/vsftpd/vsftpd.conf
Change the configuration file to ”anonymous_enable=YES “ to “anonymous_enable=NO”
Cancel the comment symbol before the configuration:
#local_enable =YES
#write_enable=YES
#chroot_local_user=YES
#ascii_upload_enable Allow uploading with ascii code
#ascii_download_enable Allow download using ascii code
Save changes, press ESC, enter: wq< Br> 5. Modify the shell configuration
vi edit /etc/shells, if there is no /usr/sbin/nologin or /sbin/nologin in the file (see the current system configuration) Go
6. Start vsftp service and test the command to start using the login
vsftp Services:
#service vsftpd start



then under test to test whether the account can login ftp. The directory is /ftp

Copyright © Windows knowledge All Rights Reserved