The vsftpd file server is intended to be deployed in the CentOS operating system. The server environment is as follows:
Operating system: Gnu/linux, x86_64
Release: CentOS release 5.9
VSFTPD Edition: Version 2.0.5
Step 1: Install the related components
Install VSFTPD using the official CentOS source
Yum Search VSFTPD Yum Install vsftpd
Yum Install Db4-utils
Confirm the path to the installation and the paths to the configuration files, as follows:
Service startup file:/etc/init.d/vsftpd
Configuration file:/etc/vsftpd/vsftpd.conf
Executable file:/usr/sbin/vsftpd
Step 2: Set up an account and password to access FTP
New file:/etc/vsftpd/logins.txt, which reads as follows:
Admin 12345678
First Action Account name, second act password.
Generate DB file According to Logins.txt:/etc/vsftpd/vsftpd_login.db
Cd/etc/vsftpd
Db_load-t-T hash-f logins.txt/etc/vsftpd/vsftpd_login.dbchmod
Modify Pam Profile:/ETC/PAM.D/VSFTPD
#%pam-1.0/lib64/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login/ lib64/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login
Create a local Virtual account: virtual, assuming the home directory is:/data/ftp
useradd-d/data/ftp virtualchown-r virtual.virtual/data/ftp
chmod 744/data/ftp
Step 3: Modify the VSFTPD configuration file
/etc/vsftpd/vsftpd.conf Content:
anonymous_enable=nolocal_enable = yeswrite_enable =yes Anon_upload_ Enable =yes anon_mkdir_write_enable =yes anon_other_write_enable =< Span style= "color: #000000;" >yes xferlog_enable =yeschroot_local_ User =yeschroot_list_enable =yesguest_ Enable =yesguest_username =virtual Listen =yespam_service_name = vsftpd
Step 4: Start the VSFTPD service
Set the boot up and start the VSFTPD service manually:
Chkconfig vsftpd on
Chkconfig--list | grep vsftpd
Service VSFTPD Start
Log in to FTP and test:
CentOS System Deployment FTP Server