Linux how to carry out Alibaba Cloud server FTP configuration

  

In China, users like to use Alibaba Cloud server, because this is the best cloud server in China, but some Linux users do not know how to perform FTP server under Ali cloud. With configuration. Let Xiaobian teach you to set it up now.

Setting method:

aliyun Linux (Redhat) software installed vsftp

1. Update yum source

first need to update the system source yum , 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

Install vsftp using the yum command

#yum install vsftpd -y

3.Add ftp account and directory

Check the location of nologin first, usually under /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 the account name and directory yourself:

#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< Br>

4.Configure vsftp

Edit the vsftp configuration file with the following command:

#vi /etc/vsftpd/vsftpd.conf

will be in the configuration file> ;anonymous_enable=YES “Change 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

To save changes, press ESC and type: wq

5. Modify the shell configuration

vi edit /etc/shells, if there is no /usr/sbin/nolog in the file In or /sbin/nologin (see the current system configuration) is added

6. Start the vsftp service and test the login

Start the vsftp service with the command:

#service Vsftpd start

Then use the account test to test whether you can log in to ftp. The directory is /ftp

Through the above steps, we can successfully set up the FTP server configuration. If you are not sure, follow the steps above to set it up.

Copyright © Windows knowledge All Rights Reserved