1. install FTP1. check if FTP is installed: [root @ localhost ~] # Rpm-qvsftpd if installed, the version information will be displayed: [root @ localhost ~] # Vsftpd-2.0.5-16.el5_5.1 otherwise: [root @ localhost ~] # Packagevsftpdisnotinstalled2. installation 1. install FTP1. check whether FTP is installed:
[Root @ localhost ~] # Rpm-q if vsftpd is installed, the version information will be displayed: [root @ localhost ~] # Vsftpd-2.0.5-16.el5_5.1 otherwise: [root @ localhost ~] # Package vsftpd is not installed
2. install FTP
[root@localhost ~]# yum install vsftpd
2.1 After ftp installation, comment out the root line in the/etc/vsftpd/user_list file and/etc/vsftpd/ftpusers file #
# root
2.2 run the following command
#setsebool -P ftpd_disable_trans=1
Modify/etc/vsftpd. conf and add local_root =/in the last line/
2.3 restart the ftp process
#service vsftpd restart
** Note: Every time you modify the ftp-related configuration file, you must restart the ftp process to take effect. The ftp server can be used. **
2. configure FTP1. create an account named test:
# Mkdir/tmp/test // first create the directory # adduser-d/tmp/test-g ftp-s/sbin/nologin test //-s/sbin/nologin is to make it cannot log on to the system, -d indicates that the user directory is/opt/srsman. that is, this account can only log on to ftp, but cannot log on to the system.
1.1 set password for test
# Passwd testChanging password for user beinan. // you will be asked to set a New password new password: Retype New password: passwd: all authentication tokens updated successfully
2. restrict the user directory. do not change the directory to the upper-level 2.1 to modify/etc/vsftpd. conf.
Remove the two lines # chroot_list_enable = YES # chroot_list_file =/etc/vsftpd. chroot_list comment and remove chroot_list_enable = YESchroot_list_file =/etc/vsftpd/chroot_list
2.2 add a file:/etc/vsftpd/chroot_list
User name required for content writing: test restart vsftpd # service vsftpd restart
3. set boot start (1) find/etc/rc. local File (2) open this file, add in the last line: service vsftpd start (3) save, exit 4. use an FTP client (I use XFTP) for fast connection
Why do I use xFTP? because xftp and xshell belong to the same series, as long as you log on to an xftp and xshell, they can directly open each other through their respective shortcut buttons.