????11??????????????????????н????
#Example config file /etc/vsftpd/vsftpd.conf
# Thedefault compiled in settings are fairly paranoid. This sample file
#loosens things up a bit?? to make the ftp daemon more usable.
#Please see vsftpd.conf.5 forall compiled in defaults.
# READTHIS: This example file is NOT an exhaustive list of vsftpd options.
#Please read the vsftpd.conf.5 manualpage to get a full idea of vsftpd's
#capabilities.
#Allow anonymous FTP  (Beware - allowed by default if you comment this out).
anonymous_enable=YES ?? ??????? ???????FTP ????????????????YES ????????????????????ftp ??anonymous ????ftp???????????????E-mail ??????粻??????????????????#???????NO ??
#Uncomment this to allow local users to log in.
local_enable=YES ??????????????? ( ?? linux ???е???????) ???FTP????????????????YES????? ?????????????????????????????????????????????????????????/var/ftp/pub ???????????????????????????#???? ??????????????FTP ??????????
#Uncomment this to enable any form of FTP write command.
write_enable=YES  ?? ??????????????? FTP ?????????????д??? ?? ???????? YES ???? ??
#Default umask for local users is 077. You may wish to change this to 022??
# ifyour users expect that (022 is used by most other ftpd's)
# local_umask=022 ?????????????????????????????? ???022?????????????y????????????????????077??
#Uncomment this to allow the anonymous FTP user to upload files. This only
# hasan effect if the above global write enable is activated. Also?? you will
#obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES ?? ???????????????????? ?? ?? write_enable=YES ?? ???????? YES ???? ??
#Uncomment this if you want the anonymous FTP user to be able to create
# newdirectories.
#anon_mkdir_write_enable=YES   ?? ????????????????????????? ?? ???????? YES ???? ??
#Activate directory messages - messages given to remote users when they
# gointo a certain directory.
#dirmessage_enable=YES ?? ????????????????? ?? ??????? CMD????η???????????????? ??FTP ????????????????? ?? ???????? ?? ??????????? ?? ???μ? .message ????????????????????????????????????????????
#Activate logging of uploads/downloads.
xferlog_enable=YES ?? ????? NO ??????????????????????????????????????????????????????????????????/var/log/vsftpd.log?? ????????????? xferlog_file ??????????趨????
# Makesure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES ?? ?趨 FTP ???????????? FTP ??????????????? ??ftp-data ??????? ??21 ?????????? ??
# Ifyou want?? you can arrange for uploaded anonymous files to be owned by
# adifferent user. Note! Using "root" for uploaded files is not
#recommended!-??????????? root ?????????
#chown_uploads=YES ?? ?趨??????? ??? ???????????? ?? ??????????趨???????? ??
#chown_username=whoeve r ?? ??????????????????????? ?? ?????? ?? ???????????????? ?? ????????????????????? root ??????whoever ???κ????
# Youmay override where the log file goes if you like. The default is shown
#below.
#xferlog_file=/var/log/vsftpd.log ( ?趨????????FTP ????????????????????????????/var/log/vsftpd.log ????????????????????)
# Ifyou want?? you can have your log file in standard ftpd xferlog format
#xferlog_std_format=YES ?? ??????????? ?? ???????????????? xferlog ??????д??????????????????/var/log/xferlog??????????xferlog_file ??????????趨???????NO??
#dual_log_enable ( ???????????????????????????????????????????/var/log/xferlog??/var/log/vsftpd.log ??????????wu_ftpd???????????????????????????????????з???????????vsftpd ????????)
#syslog_enable ( ????????????????????????????/var/log/vsftpd.log ?е????????????????????)
# Youmay change the default value for timing out an idle session.
#idle_session_timeout=600 ??????????????ж????????????????е???????ж?????600?????????????????????????FTP????????????????600???????????????????????????
# Youmay change the default value for timing out a data connection.
#data_connection_timeout=120 ?? ????????????????? ?? ????????????????????? 120 ?? ?? ??????????????????? ??
# Itis recommended that you define on your system a unique user which the
# ftpserver can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure ?? ???? vsftpd ????????????????????nobody ??
#Enable this and the server will recognise asynchronous ABOR requests. Not
#recommended for security (the code is non-trivial). Not enabling it??
#however?? may confuse older FTP clients.
#async_abor_enable=YES ?? ??? FTPclient ???′?“async ABOR ”?????????????趨?????????????????趨?????????????????????????
# Bydefault the server will pretend to allow ASCII mode but in fact ignore
# therequest. Turn on the below options to have the server actually do ASCII
#mangling on files when in ASCII mode.
#Beware that on some FTP servers?? ASCII support allows a denial of service
#attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
#predicted this attack and has always been safe?? reporting the size of the
# rawfile.
#ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES ?? ????? FTP ????????????? ASCII ??????????? ?? ?? # ?????????? ASCII ??????????????? ??
#ascii_download_enable=YES ?? ?? # ?????????? ASCII ?????????? ??
# Youmay fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service. ????#??????????FTP??????????????????????????=????????????????????????????????????????????′?????? .message ?????????д?????????????????????????????延???? ??
# Youmay specify a file of disallowed anonymous e-mail addresses. Apparently
#useful for combatting certain DoS attacks.
#deny_email_enable=YES ?? ????Щ????? email address ???????????anonymous ????????????????????????????????email address?? ??????????Щemail address ???????????趨????????????????????????????????????? ??
#(default follows)
#banned_email_file=/etc/vsftpd/banned_emails ????????? deny_email_enable=YES ???????????????趨?????漲???email address ??????vsftpd ?????????????????????????????????email address ????? ??
# Youmay specify an explicit list of local users to chroot() to their home
#directory. If chroot_local_user is YES?? then this list becomes a list of
#users to NOT chroot().
#chroot_list_enable=YES ?? ????? NO ?????????FTP ??????????з?????????????????????????? ????? YES ? ?? ???????????????? home ???У?vsftpd ???????? chroot_list_file ??????λ????? chroot_list ????????????????????? ??????????????home ??????????????У????????????
#(default follows)
#chroot_list_file=/etc/vsftpd/chroot_list ?? ?????????????? ?? ??????????????? ?? ???????????л??????????????????? ?? ?? FTP ??????????? chrooted ??????????home ???£???? chroot_list ????е????????????????????????FTP home ???£??????????FTP ????????????????????????
# Youmay activate the "-R" option to the builtin ls. This is disabled by
#default to avoid remote users being able to cause excessive I/O on large
#sites. However?? some broken FTP clients such as "ncftp" and"mirror" assume
# thepresence of the "-R" option?? so there is a strong case for enablingit.
#ls_recurse_enable=YES ?? ??????????? ?? ???????? FTP ???????????????????????????? ??
# When"listen" directive is enabled?? vsftpd runs in standalone mode and
#listens on IPv4 sockets. This directive cannot be used in conjunction
# withthe listen_ipv6 directive.
listen=YES ?? ???????? YES ?? ?? vsftpd ????????????У???vsftpd ????????????????????
# Thisdirective enables listening on IPv6 sockets. To listen on IPv4 and IPv6
#sockets?? you must run two copies of vsftpd whith two configuration files.
# Makesure?? that one of the listen options is commented !!
#listen_ipv6=YES ( ?趨??????IPV6)
#pam_service_name=vsftpd ?? ???? PAM ???????????????????????????????? ????/etc/pam.d/vsftpd ????????????file=/etc/vsftpd/ftpusers??Σ??????PAM ???????????????????????/etc/vsftpd/ftpusers?У?
#userlist_enable=YES/NO ????????????NO ?? ???ftpusers ????е??????????FTP ????????????????YES ???? user_list ????е?????????? FTP ????????????????????? userlist_deny=YES ???? user_list ????е??????????????FTP ????????????????????????????????У?????FTP ???????????
#userlist_deny=YES/NO ??????????YES ??????????賶user_list ????е???????FTP ????????
????tcp_wrappers=YES ?? ????????????? tcp_wrappers ??????????????????tcp_wrappers ???????linux ?????????????????????????????????/etc ???е?hosts.allow ??hosts.deny ???????????????tcp_wrappers ??????????????????????????????????t?????????????????????Щ??????FTP ??????192.168.57.2 ?????????????/etc/hosts.allow ?????????????????????????vsftpd:192.168.57.1:DENY ??vsftpd:192.168.57.9:DENY ????????IP ?192.168.57.1/192.168.57.9 ????????IP ?192.168.57.2 ??FTP???????????FTP ???????????PING ?????????????
????12?? ??????anonymous??????????е?
????13?? Vsftp???? /var/ftp/
????a) ???????pub?????????????????
????b) ??????????????????????anonymous?????
????14?????ftp????????linux??????????????
????15??????root??????????????
????16??????root???
????a) ??????????????????????????/etc/vsftpd??
????b) ?????????vsftpd.user_list(??root????????????#????#root)
????c) ?????????vsftpd.user_ftpusers????root????????????#????#root??
????d) ?????????vsftp  service vsftpd restart
?????????????????root?????????????????
????17?? ???????????
????a) ???????chkconfig vsftpdon??chkconfig –level 5 vsftpd on
????b) ?????2--5?on?????????????????????
????c) ??????????chkconfig--list |grep vsftpd
????d) ??????????vi????/etc/rc.local?????????/user/local/bin/vsftpd????
????18????????vsftpd??????linux??selinux??????????????????????????м?????????????????????????ú??vsftpd??????????????????????????????????????
????i. ??????
????#setsebool -P ftpd_disable_trans 1
???????????vsftpd????
????ii. ?????????????selinux
????vim /etc/sysconfig/selinux
????selinux=disable
?????????????ɡ?
????19?? ???????selinux?????? getsebool –a??sestatus -v
????a) ???setsebool?????????????setsebool ftpd_disable_trans on
????b) setsebool???-P????????????ο???????????????? setsebool -Pftpd_disable_trans on
????c) ???????selinux???????????bool?????getsebool -a  ?????sestatus -b