Set up an ftp server using centos and set up ftp using centos

Source: Internet
Author: User

Set up an ftp server using centos and set up ftp using centos

1. Install vsftpd

sudo yum install vsftpd

2. Configure vsftpd. conf

# Allow anonymous FTP? (Beware-allowed by default if you comment this out ). anonymous_enable = NO # When SELinux is enforcing check for SE bool ftp_home_dirlocal_enable = YESwrite_enable = YES # local ftp directory address local_root =/var/ftp

3. Add an ftp user

# Create user adduser-d/var/ftp-g ftp-s/sbin/nologin * _ ftp # Change Password passwd * _ ftp

4. Upload permission

# Modify the upload path permission 777. Set sudo chmod-R 777/var/ftp. # view ftp settings getsebool-a | grep ftpftp_home_dir --> onftpd_anon_write --> offline --> offftpd_connect_db --> offftpd_full_access --> offline --> offsftpd_full_access --> offline --> offtftp_home_dir --> off # Change ftp_home_dir and ftpd_full_access to onsetsebool-P ftp_home_dir = on ftpd_full_access = on

5. Set vsftp to start upon startup

chkconfig vsftpd on

6. Add a firewall

firewall-cmd --permanent --add-service=ftpfirewall-cmd --reload

 

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.