Directory:
1.redhat/centos Install vsftp Software
2.ubuntu/debian Install vsftp Software
Øredhat/centos Install vsftp Software
1. Update Yum Source
First need to update the system Yum source, convenient tool download address: http://help.aliyun.com/manual?&helpId=1692
2. Installation Vsftp
Install vsftp using 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.
Use the following command to create an account that specifies the home directory of/alidata/www/wwwroot as the user pwftp you can define your own account name and directory:
#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" to "Anonymous_enable=no" in the configuration file
Remove the annotation symbol before the following configuration:
Local_enable=yes
Write_enable=yes
Chroot_local_user=yes
Save changes, press ESC, enter: WQ
5. Modify Shell Configuration
VI Edit/etc/shells, if there is no/usr/sbin/nologin or/sbin/nologin in the file (see the current system configuration) append it.
6. Start vsftp Service and test login
To start the VSFTP service with a command:
#service vsftpd Start
Then use the Account PWFTP test whether can log on FTP. Directory is/alidata/www/wwwroot
Øubuntu/debian Install vsftp Software
1, update the software source
First need to update the system's software source, convenient tool download address: http://help.aliyun.com/manual?&helpId=1692
2. Installation 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.
Use the following command to create an account that specifies the home directory of/alidata/www/wwwroot as the user pwftp you can define your own account name and directory:
#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" to "Anonymous_enable=no" in the configuration file
Remove the annotation 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, and save the exit.
5. Modify Shell Configuration
VI Edit/etc/shells, if there is no/usr/sbin/nologin or/sbin/nologin in the file (see the current system configuration) append it.
6. Restart VSFTP service and test login
To start the VSFTP service with a command:
#service vsftpd Restart
Then use the Account PWFTP test whether can log on FTP. Directory is/alidata/www/wwwroot