First, the simple implementation of FTP function
1.Linux FTP Server classification:
(1) wu-ftp
(2) Proftp=profession FTP
(3) Vsftp=very Security FTP
2. VSFTPD,DB4 and db4-utils are installed to enable virtual users
Yum-y Install vsftpd DB4 db4-utils
3. Create a user
To create a user password:
Useradd YNIPC
passwd Setting a password
4. Next modify the/home/ynipc/directory properties: (or any directory of your own definition)
Chown-r ynipc/home/ynipc/recursively set all directories and files to the newly added FTP user
Chmod-r 755/home/ynipc/to set the full rights of the proponents recursively, other users only read and Execute permissions
5. Login
If you are simply using FTP, modify 1 places and do not allow anonymous users to log in
Vi/etc/vsftpd/vsftpd.conf
Anonymous_enable=no
6. Restart the VSFTPD service
Service VSFTPD Start
Second, restrict user Active Directory, do not allow users to switch (CD) to the parent directory
1. After the user login FTP, can only stay in their home directory/HOME/YNIPC. The configuration file is as follows, the listening port is changed to 5021
[Email protected] ~]# cat/etc/vsftpd/vsftpd.conf
Anonymous_enable=no
Local_enable=yes
Write_enable=yes
local_umask=022
Dirmessage_enable=yes
Xferlog_enable=yes
Connect_from_port_20=yes
Xferlog_std_format=yes
Listen=yes
Pam_service_name=vsftpd
Userlist_enable=yes
Tcp_wrappers=yes
#chroot_local_user =yes
Chroot_list_enable=yes
Chroot_list_file=/etc/vsftpd/chroot_list
listen_port=5021
2. This file is restricted to FTP users who cannot switch directories
[Email protected] ~]# cat/etc/vsftpd/chroot_list
Ynipc
Bjsqt
Shskb
Gzsqt
3. These two profiles are users who cannot log in to FTP/etc/vsftpd/ftpusers and/etc/vsftpd/user_list
Third, the virtual user, this does not introduce, to an article reference
http://yuanbin.blog.51cto.com/363003/129071
There are three ways we log in to FTP, anonymous logins, local user logins, and virtual user logins.
Anonymous Logon: Use the default user name when signing in to FTP, usually ftp or anonymous.
Local User login: Log in using the system user, in/etc/passwd.
Virtual User login: This is a dedicated FTP user, there are two ways to implement virtual users, local data files and database servers.
FTP Virtual user is the exclusive user of FTP server, using Virtual user login FTP, can only access the resources provided by FTP server, greatly enhance the security of the system.
This article is from "Kaka West" blog, please be sure to keep this source http://whnba.blog.51cto.com/1215711/1617261
Redhat 5.4 Mounting Vsftp