Simple tutorial on building FTP server for Linux

Source: Internet
Author: User
Tags ftp login

Reference article: https://www.waitig.com/linux-or-centos-install-vsftpd-and-setup-it.html

The steps are summarized as follows:

Installation: Yum Install VSFTPD

Action: Service VSFTPD Start|stop|restart

Configuration section (emphasis):

1. In order to secure the system, an FTP user is generally established, the user cannot log on to the system, and can only access the files in their home directory.

useradd-d/var/ftp/test-g ftp-s/sbin/nologin ftpuser

Where the-d command is specified with the home directory,-G is the specified user group,-s/sbin/nologin is forbidden to login to the system, and finally Ftpuser is the user name of this new user.

then set the password: passwd Fptuser

2. Configure the user login list and add the new user to the FTP login list.

The user list is configured by opening the configuration file and finding the following two lines, removing the comment symbol.

chroot_list_enable= YES

# (default follows)

chroot_list_file=/etc/vsftpd/chroot_list

This defines a user list that only users on the list can log into the system.

3. Create this /etc/vsftpd/chroot_list file and add the user name Ftpuser you can access. Then restart the FTP service.

Operation Explanation:

-d/var/ftp/test----------------------------------remote machine to access the root directory of this FTP server, the file list is consistent with this directory.

USERADD/PASSWD---------------------------------a local user name and password

/etc/vsftpd/chroot_list---------------------------Local user name XX as the FTP user name

A simple tutorial on building an FTP server for Linux

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.