Open FTP service under Linux

Source: Internet
Author: User

First, the configuration steps

1. Installing VSFTP

Installing vsftp with the Yum command

#yum Install Vsftpd-y

2. Add FTP Account and directory

determine the location of the nologin, usually under/usr/sbin/nologin or/sbin/nologin, and then use the following command to create the account, which specifies the root directory where HOME/FTP01 is the user ftp01. You can define your account name and directory yourself:

#useradd-D home/ftp01-s/sbin/nologin FTP01

3. Modify the password for this account:

#passwd YourPassword

4. Modify permissions for the specified directory

#chown-R FTP01.FTP01/HOME/FTP01

5. Configure Vsftp

Edit the Vsftp configuration file with the following command:

#vi/etc/vsftpd/vsftpd.conf

Change "Anonymous_enable=yes" in the configuration file to "Anonymous_enable=no"

Remove the comment symbol before the following configuration:

Local_enable=yes

Write_enable=yes

Chroot_list_enable=no

Chroot_local_user=no

At this point, all users can switch to a different directory.

Save changes, press ESC, enter: WQ

6. Modify the shell configuration

VI Edit/etc/shells, if there is no/usr/sbin/nologin or/sbin/nologin in the file (depending on the current system configuration) is appended.

7. Start the VSFTP service and test the login

To start the VSFTP service with a command:

#service vsftpd Start

Then use the Account FTP01 test whether you can login ftp. The directory is HOME/FTP01.

Second, detailed user rights

The following effects can be achieved with chroot_list_enable and chroot_local_user=yes/no:
1, when Chroot_list_enable=yes,chroot_local_user=yes, in the/etc/vsftpd/chroot_list file listed in the user, you can switch to a different directory, not listed in the file users, You cannot switch to a different directory.
2. When Chroot_list_enable=yes,chroot_local_user=no, users listed in the/etc/vsftpd/chroot_list file cannot switch to a different directory, and users who are not listed in the file You can switch to a different directory.
3, when Chroot_list_enable=no,chroot_local_user=yes, all users can not switch to other directories.
4, when Chroot_list_enable=no,chroot_local_user=no, all users can switch to other directories.

Open FTP service under 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.