Open FTP Service under CentOS

Source: Internet
Author: User
Tags ftp connection

If FTP is required to access Linux, VSFTPD is a better FTP server under Linux.

First, check the installation vsftp

1 // Check if VSFTPD is installed 2  grep vsftpd 3 // No, install vsftpd . 4  Yum Install vsftpd 5 chkconfig vsftpd on

Second, edit the VSFTP configuration item

Configure open Virtual account (login FTP only, not login system) and set access directory

1vim/etc/vsftpd/vsftpd.conf2Anonymous_enable=no//setting does not allow anonymous access 3Local_enable=yes//set the local user to be accessible.  4Chroot_list_enable=yes//users cannot leave the home directory 5ascii_upload_enable=YES6Ascii_download_enable=yes//set upload and download features that support ASCII mode 7Pam_service_name=vsftpd//Pam Authentication file name. Pam will be certified according to/ETC/PAM.D/VSFTPD 8  9//Manually addTenGuest_enable=yes//Setting the Enable Virtual User feature One  AUser_config_dir=/etc/vsftpd/vuser_conf//set up the CentOS FTP service file storage path for virtual user personal vsftp - //for Certification -chroot_list_file=/etc/vsftpd/Vuser_passwd.txt the  -local_root=///setting access directory not configured by default is/var/ftp

Third, install the Berkeley DB Tool (file database, we use files to store the virtual user's account password)

Yum Install DB4 db4-utils

Four, create user password text/etc/vsftpd/vuser_passwd.txt, odd line is the user name, even line is the password

1 vim/etc/vsftpd/vuser_passwd.txt
2 Test 123456

V. Generate a DB file of virtual Virtual user account password and associate the data db file

1 db_load-t-T hash-f/etc/vsftpd/vuser_passwd.txt/etc/vsftpd/vuser_passwd.db

Edit the authentication file/etc/pam.d/vsftpd, All comments out the original statement, and then add the following two sentences

1 auth required pam_userdb.so db=/etc/vsftpd/vuser_passwd2 account required pam_userdb.so db=/etc/vsftpd/vuser_passwd

Six, restart VSFTPD service

1 Service vsftpd restart

Finally, create a new FTP connection to the FTP server

  

Open FTP Service under CentOS

Related Article

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.