Install vsftp server
Run the rpm-q vsftpd command to check whether this service is installed. If yes, the vsftp version is displayed. If no version is installed, the system prompts "package vsftpd is not installed ". Run the "yum-y install vsftpd" command to install the SDK. The installation process is as follows:
Go to the/etc/vsftpd directory and you can see the main vsftpd configuration file:
/Etc/vsftpd. conf // master configuration file
/Etc/vsftpd/ftpusers // user files prohibited from logging on to FTP
/Etc/vsftpd/user_list // user files that allow FTP logon
Modify vi/etc/vsftpd. conf: change anonymous_enable = YES to NO to disable anonymous ftp logon and cancel the annotation symbol chroot_local_user = YES. Restrict ftp users to the home directory. Create a www directory under the home directory as the main directory for ftp logon.
Run "service vsftpd start" to start the vsftp service.
Run the "useradd-d/home/www-s/sbin/nologin testftp" command, which means to add a user testftp to the/home/www directory. Then, use passwd testftp to set the user password. Then, use chmod-R 755/home/www and chown-R testftp/home/www to set permissions.
Then, log in with the ftp account and password you just set.
Finally, add the command "chkconfig -- levels 3 vsftpd on" to start vsftp at startup"
Vsftpd logon error 500 OOPS: cocould not open chroot () list file:/etc/vsftpd/chroot_list solution
The first is:
Restrict users to access only the configured directory and other paths
Modify vi/etc/vsftpd. conf
Chroot_list_enable = YES // restrict access to its own directory and change YES to NO
# (Default follows)
The second is:
To restrict the access to the current directory, but because of this configuration, an error is returned if the empty file vsftpd/chroot_list is to be read. This is a restricted user list.
Create a user list without writing any content.
Run the "vi/etc/vsftpd/chroot_list" command to create a new file, enter some text, save and exit.