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
Yum install vsftpd

2. Edit iptables
Vi/etc/sysconfig/iptables
-A input-m state -- state NEW-m tcp-p tcp -- dport 21
Service iptables restart

3. Configure vsftpd
Vi/etc/vsftpd. conf
Anonymous_enable = NO // you are not allowed to access anonymous users.

4. Add an ftp user
Vi/etc/vsftpd. conf
Chroot_list_enable = YES
Chroot_list_file =/etc/vsftpd/chroot_list

5. Add the ftp user home directory
Useradd-d/var/www/html-g ftp-s/sbin/nologin test

6. Set the User Password
Passwd test

7. Modify permissions
Chmod 777/var/www/html-R
Chown test: ftp/var/www/html

8. Start vsftpd
Service vsftpd restart

OK! You can log on with the test user.

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.