Linux RPM real-World build FTP server

Source: Internet
Author: User
Tags ftp client

1. Detect if the FTP service is installed

# Rpm-qa|grep VSFTPD

2. Using the RPM installation without the FTP service installed

# yum Install Vsftpd-y

Loaded plugins:securityBase|3.7Kbxx:xxEpel|4.7Kbxx:xxEpel/primary_db |6.0MBxx:xxExtras|3.4Kbxx:xxExtras/primary_db | inKbxx:xxUpdates|3.4Kbxx:xxUpdates/primary_db |5.8MBxx:xxSetting up Install processresolving Dependencies-Running Transaction Check---> Package vsftpd.x86_640:2.2.2- -. El6 'll be installed-finished Dependency resolutiondependencies resolved===========================================================================================Package Arch Version Repository Size===========================================================================================installing:vsftpd x86_642.2.2- -. el6Base              156ktransaction Summary===========================================================================================Install1Package (s) Total Download size:156kinstalled Size:340kdownloading packages:vsftpd-2.2.2- -. el6.x86_64.rpm |156Kbxx:xxRunning rpm_check_debugrunning Transaction testtransaction Test succeededrunning Transaction installing:vsftpd -2.2.2- -. el6.x86_641/1verifying:vsftpd-2.2.2- -. el6.x86_641/1Installed:vsftpd.x86_640:2.2.2- -. El6 Complete!

Download and install complete.

3. Start the service

# service VSFTPD Start

 for vsftpd:                                [  OK  ]

Start ftp command #service vsftpd start

Stop FTP command #service vsftpd stop

Restart FTP command #service vsftpd restart

4. Configure FTP parameters

4.1 Anonymous Users

#vim  /etc/vsftpd/vsftpd.conf  -- Edit configuration file anonymous_enable=no  -- Modify the configuration entry to  prevent anonymous logons #anon_ Upload_enable=Yes      upload #anon_mkdir_write_enable=Yes    Create #anon_other_write_enable= YES    Delete #service vsftpd restart

4.2 Create a user and password

#useradd-S/sbin/nologin testaccount-- Create account #passwd  testaccount--For is new Password:passwd:all authentication tokens updated successfully.  

4.3 Setting users to access their own directories only

vim/etc/vsftpd/vsftpd.conf--Add chroot_list_enable// restrict access to own directory  on the last line# (  Default  follows) Chroot_list_file=/etc/vsftpd/vsftpd.chroot_list

Cut into the/ETC/VSFTPD directory

Edit the Vsftpd.chroot_list file to add restricted users, one row per user name

[[email protected]--Add a user name that needs to be restricted

Modify Completion Restart FTP service

[Email protected]Web vsftpd]# service vsftpd restartshutting down vsftpd:                                      [  OK  for vsftpd:   

5. Test the connection and upload the file

Command: List error: Unable to open the transport channel. Cause: The connection attempt failed because the connecting party did not reply correctly after a period of time or the connected host did not respond. Error: Unable to get directory list

The connection was successful using 8UFTP, but the response list timed out. The reason is because the firewall needs to be set as the active mode, but it is said that the active mode is more prone to problems, but the test of the FTP client changed to Active mode, the successful landing of the FTP server, to solve the problem.

Successful connection after modification:

Linux RPM real-World build 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.