The establishment of FTP server in Linux and the establishment of linuxftp

Source: Internet
Author: User

The establishment of FTP server in Linux and the establishment of linuxftp

The CentOs6.8 installed on vmware12 enables Windows 10 on the physical machine to normally access the FTP server on CentOs.

1. Check whether ftp-related installation packages are installed.

# Rpm-qa | grep vsftpd // The ftp installation package is vsftpd

Check that no related package is installed in my system, so first package the installation.

# Yum-y install vsftpd // If the yum source is not configured here, You can directly install it using rpm.

Check whether the installation is successful.

 

2. Start the service and set Automatic startup.

# Service vsftpd start // start the service

 

# Chkconfig -- level 35 vsftpd on // set auto-start

# Chkconfig -- list vsftpd // check whether the setting is successful

3. Configure the vsftpd File

The ftp server has three configuration files in the/etc/vsftpd directory:

Ftpusers // specifies which users cannot access the ftp server

User_list // whether users in this file can log on to the server depends on the options userlist_enable and userlist_deny In the vsftpd. conf file.

Vsftpd. conf // master configuration file of the ftp server

 

Iv. Anonymous user access

Open vsftpd. conf

# Vi/etc/vsftpd/vsftp. conf

Set these two options to YES: anon_upload_enable = YES and anon_mkdir_write_enable = YES (by default, the previous '#' is removed)

This allows anonymous users to upload and download files.

  

 

 

5. Access by non-Anonymous Users

1. modify the configuration file

# Vi/etc/vsftpd/vsftp. conf

Disable Anonymous user access first: anon_upload_enable = NO

Add userlist_enable = YES, userlist_file =/etc/vsftpd. user_list, userlist_deny = NO at the end of the configuration file.

(For more information, see the configuration file)

  

2. Create a user

  

3. Test it here and log on directly using ftp1. It is found that the logon fails.

  

4. Put the user ftp into the/etc/vsftpd. user_list file.

# Vi/etc/vsftpd. user_list

Write ftp1 to the file (one row represents a user), save and exit, and reload the service (# service vsftpd reload ).

  

Access again. If you use ftp1, you can log on to the ftp server.

  

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.