ftp650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0017.gif "alt=" J_0017.gif "/>
Install FTP
1.yuminstall vsftpd–y
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8A/21/wKioL1gpB0uBtythAACKnMAZJmk373.png-wh_500x0-wm_3 -wmp_4-s_262972555.png "title=" 1.png "alt=" Wkiol1gpb0ubtythaacknmazjmk373.png-wh_50 "/>
lftp ID can login and display, indicating installation success
Setenforce 0 ( error 553, local file system error 0:selinux Mode 1: Forced mode )
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/8A/25/wKiom1gpB1qDecxAAAA7Kce4ndU101.png-wh_500x0-wm_3 -wmp_4-s_2018453526.png "title=" 2.png "alt=" Wkiom1gpb1qdecxaaaa7kce4ndu101.png-wh_50 "/>
2. Configure the firewall
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8A/21/wKioL1gpB2WgDr8TAAFBfSNF3FQ915.png-wh_500x0-wm_3 -wmp_4-s_3922619498.png "title=" 3.png "alt=" Wkiol1gpb2wgdr8taafbfsnf3fq915.png-wh_50 "/>
3.vsftpd file Information
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/8A/25/wKiom1gpB3HxOZRiAADUdydhzRI241.png-wh_500x0-wm_3 -wmp_4-s_3111338490.png "title=" 4.png "alt=" Wkiom1gpb3hxozriaadudydhzri241.png-wh_50 "/>
/var/ftp Default Publishing Directory
/etc/vsftpd Configuration Directory
4.vsftpd configuration parameters for the server
Anonymous User Login Restrictions
Anonymous_enable=yes|no
Anonymous uploads
Vim/etc/vsftpd/vsftpd.conf
Anon_enable=yes
Chgrp ftp/var/ftp/pub
chmod 755/var/ftp/pub ( error 550 service itself error, view service profile )
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8A/25/wKiom1gpB4vTx9_fAACFnjFR74k704.png-wh_500x0-wm_3 -wmp_4-s_2587212149.png "style=" Float:none; "title=" 5.png "alt=" Wkiom1gpb4vtx9_faacfnjfr74k704.png-wh_50 "/>
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8A/21/wKioL1gpB4ywXSYmAAD43Dib1UI584.png-wh_500x0-wm_3 -wmp_4-s_367903373.png "style=" Float:none; "title=" 6.png "alt=" Wkiol1gpb4ywxsymaad43dib1ui584.png-wh_50 "/>
Anonymous user upload file default permission modification ( Note: This sentence and anon_world_readable_only=on can only write one sentence )
anon_umask=022 (the system kernel will cut down the execution permissions )
Anonymous users to download their own uploaded files
anon_world_readable_only=on| YES
Anonymous user Delete
Anon_other_write_enable=yes|no
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/8A/25/wKiom1gpB6byj5Y9AAI7emrFeeI212.png-wh_500x0-wm_3 -wmp_4-s_1696431671.png "style=" Float:none; "title=" 7.png "alt=" Wkiom1gpb6byj5y9aai7emrfeei212.png-wh_50 "/>
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/8A/21/wKioL1gpB6jj0DVPAAEtnBeKFac113.png-wh_500x0-wm_3 -wmp_4-s_3412739503.png "style=" Float:none; "title=" 8.png "alt=" Wkiol1gpb6jj0dvpaaetnbekfac113.png-wh_50 "/>
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/8A/25/wKiom1gpB6mA2XI1AAFBeV1R5TA262.png-wh_500x0-wm_3 -wmp_4-s_2382251605.png "style=" Float:none; "title=" 9.png "alt=" Wkiom1gpb6ma2xi1aafbev1r5ta262.png-wh_50 "/>
Anonymous User home Directory modification
Anon_root=/direcotry
User identity modifications used by anonymous users
Chown_uploads=yes
Chown_username=student
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8A/21/wKioL1gpB8TzfRU1AAEAJx7pq3w289.png-wh_500x0-wm_3 -wmp_4-s_468679529.png "title=" 10.png "alt=" Wkiol1gpb8tzfru1aaeajx7pq3w289.png-wh_50 "/>
Maximum transmission limit for anonymous users
anon_max-rate=102400
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8A/21/wKioL1gpB9GBkiArAACjJAqLjr4487.png-wh_500x0-wm_3 -wmp_4-s_1463459212.png "title=" 11.png "alt=" Wkiol1gpb9gbkiaraacjjaqljr4487.png-wh_50 "/>
Number of login limits for anonymous users ( maximum number of links )
Max_clients=1
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/8A/25/wKiom1gpB-WzHV9ZAABvgWk2rXk340.png-wh_500x0-wm_3 -wmp_4-s_1846695052.png "title=" 12.png "alt=" Wkiom1gpb-wzhv9zaabvgwk2rxk340.png-wh_50 "/>
Local User settings
Local_enable=yes|no Local User Login restrictions
Write_enable=yes|no Local User Write permission restrictions
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8A/25/wKiom1gpB_3z8Z5yAADHfEQfB0I478.png-wh_500x0-wm_3 -wmp_4-s_1806323475.png "title=" 13.png "alt=" wkiom1gpb_3z8z5yaadhfeqfb0i478.png-wh_50 "/>
Local User Home Directory modification
Local_root=/directory
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/8A/21/wKioL1gpCA-iFNl_AACljPGL4Xg821.png-wh_500x0-wm_3 -wmp_4-s_2347758597.png "style=" Float:none; "title=" 14.png "alt=" Wkiol1gpca-ifnl_aacljpgl4xg821.png-wh_50 "/>
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8A/25/wKiom1gpCBGQ57L9AAJpG3bKP_A420.png-wh_500x0-wm_3 -wmp_4-s_1294076473.png "style=" Float:none; "title=" 15.png "alt=" Wkiom1gpcbgq57l9aajpg3bkp_a420.png-wh_50 "/>
Local User upload file permissions
Local_umask=xxx
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8A/21/wKioL1gpCCXTQcErAABe_M6WQ1A651.png-wh_500x0-wm_3 -wmp_4-s_2970398972.png "style=" Float:none; "title=" 16.png "alt=" Wkiol1gpccxtqceraabe_m6wq1a651.png-wh_50 "/>
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/8A/25/wKiom1gpCCaye8s7AACDm-BLFIE593.png-wh_500x0-wm_3 -wmp_4-s_353292588.png "style=" Float:none; "title=" 17.png "alt=" Wkiom1gpccaye8s7aacdm-blfie593.png-wh_50 "/>
Restrict local user Browse/directory
All users are locked into their home directory
Chroot_local_user=yes
chmod u-w/home/* (otherwise there will be a warning conflict error)
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8A/21/wKioL1gpCDaQtaNmAADPXYr1k08558.png-wh_500x0-wm_3 -wmp_4-s_3272523060.png "title=" 18.png "alt=" Wkiol1gpcdaqtanmaadpxyr1k08558.png-wh_50 "/>
user blacklist (all local users can freely access local files, but the blacklist file is written in the user can not )
Chroot_local_user=no
Chroot_list_enable=yes
Chroot list File=/etc/vsftpd/chroot List
User whitelist (all local users cannot access files other than their home directories, but users written in the whitelist file can)
Chroot_local_user=yes
Chroot_list_enable=yes
Chroot list File=/etc/vsftpd/chroot List
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M00/8A/25/wKiom1gpCFSy9GkPAABP9OJU-o4610.png-wh_500x0-wm_3 -wmp_4-s_620167200.png "style=" Float:none; "title=" 19.png "alt=" Wkiom1gpcfsy9gkpaabp9oju-o4610.png-wh_50 "/>
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/8A/21/wKioL1gpCFXCr6S1AAB6VsdnNHs640.png-wh_500x0-wm_3 -wmp_4-s_933154066.png "style=" Float:none; "title=" 20.png "alt=" Wkiol1gpcfxcr6s1aab6vsdnnhs640.png-wh_50 "/>
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/8A/21/wKioL1gpCFbTV2AuAAAp8DfwNcU603.png-wh_500x0-wm_3 -wmp_4-s_3542939538.png "style=" Float:none; "title=" 21.png "alt=" Wkiol1gpcfbtv2auaaap8dfwncu603.png-wh_50 "/>
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/8A/25/wKiom1gpCFeh78ghAAJP6XFEYf0808.png-wh_500x0-wm_3 -wmp_4-s_3942010816.png "style=" Float:none; "title=" 22.png "alt=" Wkiom1gpcfeh78ghaajp6xfeyf0808.png-wh_50 "/>
Restrict Local User Login
Vim/etc/vsftpd/ftpusers
Vim/etc/vsftpd/user-list
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8A/25/wKiom1gpCG3Rp_flAAEDYke2TjE390.png-wh_500x0-wm_3 -wmp_4-s_129831378.png "style=" Float:none; "title=" 23.png "alt=" Wkiom1gpcg3rp_flaaedyke2tje390.png-wh_50 "/>
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8A/21/wKioL1gpCG7wP3HvAACMTNnAAaw369.png-wh_500x0-wm_3 -wmp_4-s_914712250.png "style=" Float:none; "title=" 24.png "alt=" Wkiol1gpcg7wp3hvaacmtnnaaaw369.png-wh_50 "/>
User White list settings
Userlist_deny=no (blacklist forbidden, double negative, so white list)
/etc/vsftpd/user_list
Users who appear in the whitelist can log in to FTP
FTP Virtual user's settings
Vim/etc/vsftpd/loginusers
Ftpuser1
123
Ftpuser2
123
Ftpuser3
123
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/8A/21/wKioL1gpCITikb9UAABHQ5CHZWk764.png-wh_500x0-wm_3 -wmp_4-s_525977962.png "title=" 25.png "alt=" Wkiol1gpcitikb9uaabhq5chzwk764.png-wh_50 "/>
Db_load-t-T hash-f/etc/vsftpd/loginusers loginusers.db
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8A/25/wKiom1gpCLHTDeC6AAEHYvKuzUk199.png-wh_500x0-wm_3 -wmp_4-s_29739339.png "style=" Float:none; "title=" 26.png "alt=" Wkiom1gpclhtdec6aaehyvkuzuk199.png-wh_50 "/>
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8A/21/wKioL1gpCLKzllmHAAA8nHuUTJA523.png-wh_500x0-wm_3 -wmp_4-s_1487658496.png "style=" Float:none; "title=" 27.png "alt=" Wkiol1gpclkzllmhaaa8nhuutja523.png-wh_50 "/>
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/8A/25/wKiom1gpCLTDABjNAACKeWhJlc0446.png-wh_500x0-wm_3 -wmp_4-s_1985777437.png "style=" Float:none; "title=" 28.png "alt=" Wkiom1gpcltdabjnaackewhjlc0446.png-wh_50 "/>
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/8A/25/wKiom1gpCN_xUb7rAABhkOuT9oQ764.png-wh_500x0-wm_3 -wmp_4-s_1589404056.png "title=" 31.png "alt=" Wkiom1gpcn_xub7raabhkout9oq764.png-wh_50 "/>
Vim/etc/vsftpd/vsftpd.conf
Pam_service_name=ddd
Guest_enable=yes
Virtual Account Identity Designation
Guest_username=ftp
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8A/25/wKiom1gpCMmyoKK7AAFNE373NiM286.png-wh_500x0-wm_3 -wmp_4-s_791928950.png "title=" 29.png "alt=" Wkiom1gpcmmyokk7aafne373nim286.png-wh_50 "/>
Virtual Account Home directory independent settings
Vim/etc/vsftpd/vsftpd.conf
local_root=/ftpdir/$USER
user_sub_token= $USER
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/8A/21/wKioL1gpCNbDT6zFAAGQeKOZwXw579.png-wh_500x0-wm_3 -wmp_4-s_27818388.png "title=" 30.png "alt=" Wkiol1gpcnbdt6zfaagqekozwxw579.png-wh_50 "/>
FTP Learning Chapter