How to make FTP settings under Linux

Source: Internet
Author: User
Tags aliyun

First, Redhat/centos install vsftp software

1. Update the Yum source
First, you need to update the system's Yum source, handy tool: http://help.aliyun.com/manual?spm=0.0.0.0.zJ3dBU&helpId=1692


2. Installing VSFTP
Installing vsftp with the Yum command
#yum Install Vsftpd-y


3. Add FTP Account and directory
Check the position of the nologin first, usually under/usr/sbin/nologin or/sbin/nologin.
Create an account using the following command, which specifies the home directory where/alidata/www/wwwroot is the user pwftp, and you can define your account name and directory yourself:
#useradd-D/alidata/www/wwwroot-s/sbin/nologin pwftp
Modify the account password:
#passwd pwftp
Modify permissions for the specified directory
#chown-R Pwftp.pwftp/alidata/www/wwwroot


4. 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_local_user=yes
Save changes, press ESC, enter: WQ


5. 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


6. Start the VSFTP service and test the login
To start the VSFTP service with a command:
#service vsftpd Start
Then use the Account PWFTP test whether you can login ftp. The directory is/alidata/www/wwwroot.

Second, Ubuntu/debian installation vsftp software

1. Update the SOFTWARE source
First need to update the system's software source, convenient tool: http://help.aliyun.com/manual?spm=0.0.0.0.zJ3dBU&helpId=1692


2. Installing VSFTP
Install vsftp using the Apt-get command
#apt-get Install Vsftpd-y


3. Add FTP Account and directory
Check the position of the nologin first, usually under/usr/sbin/nologin or/sbin/nologin.
Create an account using the following command, which specifies the home directory where/alidata/www/wwwroot is the user pwftp, and you can define your account name and directory yourself:
#useradd-D/alidata/www/wwwroot-s/sbin/nologin pwftp
Modify the account password:
#passwd pwftp
Modify permissions for the specified directory
#chown-R Pwftp.pwftp/alidata/www/wwwroot


4. Configure Vsftp
Edit the Vsftp configuration file with the following command:
#vi/etc/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_local_user=yes
Chroot_list_enable=yes
Chroot_list_file=/etc/vsftpd.chroot_list
Save exit
Edit the/etc/vsftpd.chroot_list file, add the FTP account name, save the exit


5. 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


6. Restart the VSFTP service and test the login
To start the VSFTP service with a command:
#service vsftpd Restart
Then use the Account PWFTP test whether you can login ftp. The directory is/alidata/www/wwwroot.

How to make FTP settings 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.