Alibaba Cloud: LinuxFTP service configuration

Source: Internet
Author: User
First you need to update the system's yum source, convenient tool: http://help.aliyun.com/manual? Spm = 0.0

? Install vsftp software in Redhat/CentOS

1. update yum source

First you need to update the system's yum source, convenient tool: http://help.aliyun.com/manual? Spm = 0.0.0.0.zJ3dBU & helpId = 1692

2. install vsftp

Use the yum command to install vsftp

# Yum install vsftpd-y

3. add an ftp account and Directory

First check the location of nologin, usually under/usr/sbin/nologin or/sbin/nologin.

Use the following command to create an account. the command specifies/alidata/www/wwwroot as the home directory of user pwftp. you can define the account name and directory by yourself:

# Useradd-d/alidata/www/wwwroot-s/sbin/nologin pwftp

Change the account password:

# Passwd pwftp

Modify the permission of a specified directory

# Chown-R pwftp. pwftp/alidata/www/wwwroot

4. configure vsftp

To edit the vsftp configuration file, run the following command:

# Vi/etc/vsftpd. conf

Change "anonymous_enable = YES" in the configuration file to "anonymous_enable = NO"

Cancel the annotator before the following configuration:

Local_enable = YES

Write_enable = YES

Chroot_local_user = YES

Save the modification, press ESC, and enter: wq

5. modify shell configuration

Vi edit/etc/shells. if the file does not contain/usr/sbin/nologin or/sbin/nologin (depending on the current system configuration), append it

6. start the vsftp service and test logon.

Run the following command to start the vsftp service:

# Service vsftpd start

Then, use the account pwftp to test whether ftp can be logged on. The directory is/alidata/www/wwwroot.

 

? Install vsftp in Ubuntu/Debian

1. update the software source

First you need to update the system software source, convenient tool: http://help.aliyun.com/manual? Spm = 0.0.0.0.zJ3dBU & helpId = 1692

2. install vsftp

Use the apt-get command to install vsftp

# Apt-get install vsftpd-y

3. add an ftp account and Directory

First check the location of nologin, usually under/usr/sbin/nologin or/sbin/nologin.

Use the following command to create an account. the command specifies/alidata/www/wwwroot as the home directory of user pwftp. you can define the account name and directory by yourself:

# Useradd-d/alidata/www/wwwroot-s/sbin/nologin pwftp

Change the account password:

# Passwd pwftp

Modify the permission of a specified directory

# Chown-R pwftp. pwftp/alidata/www/wwwroot

4. configure vsftp

To edit the vsftp configuration file, run the following command:

# Vi/etc/vsftpd. conf

Change "anonymous_enable = YES" in the configuration file to "anonymous_enable = NO"

Cancel the annotator before the following configuration:

Local_enable = YES

Write_enable = YES

Chroot_local_user = YES

Chroot_list_enable = YES

Chroot_list_file =/etc/vsftpd. chroot_list

Save and exit

Edit the/etc/vsftpd. chroot_list file, add the ftp account name, save and exit.

5. modify shell configuration

Vi edit/etc/shells. if the file does not contain/usr/sbin/nologin or/sbin/nologin (depending on the current system configuration), append it

6. restart the vsftp service and test logon.

Run the following command to start the vsftp service:

# Service vsftpd restart

Then, use the account pwftp to test whether ftp can be logged on. The directory is/alidata/www/wwwroot.

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.