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.