linux中ftp配置 Ubuntu,Ubuntu中Vsftp的配置和使用

#Exampleconfigfile/etc/vsftpd.conf

#

#Thedefaultcompiledinsettingsarefairlyparanoid.Thissamplefile

#loosensthingsupabit,tomaketheftpdaemonmoreusable.

#Pleaseseevsftpd.conf.5forallcompiledindefaults.

#

#READTHIS:ThisexamplefileisNOTanexhaustivelistofvsftpdoptions.

#Pleasereadthevsftpd.conf.5manualpagetogetafullideaofvsftpd's

#capabilities.

#

#

#Runstandalone?vsftpdcanruneitherfromaninetdorasastandalone

#daemonstartedfromaninitscript.

listen=YES

#

#RunstandalonewithIPv6?

#Likethelistenparameter,exceptvsftpdwilllistenonanIPv6socket

#insteadofanIPv4one.Thisparameterandthelistenparameteraremutually

#exclusive.

#listen_ipv6=YES

#

#AllowanonymousFTP?(Beware-allowedbydefaultifyoucommentthisout).

anonymous_enable=YES

#

#Uncommentthistoallowlocaluserstologin.

#local_enable=YES

#

#UncommentthistoenableanyformofFTPwritecommand.

#write_enable=YES

#

#Defaultumaskforlocalusersis077.Youmaywishtochangethisto022,

#ifyourusersexpectthat(022isusedbymostotherftpd's)

#local_umask=022

#

#UncommentthistoallowtheanonymousFTPusertouploadfiles.Thisonly

#hasaneffectiftheaboveglobalwriteenableisactivated.Also,youwill

#obviouslyneedtocreateadirectorywritablebytheFTPuser.

#anon_upload_enable=YES

#

#UncommentthisifyouwanttheanonymousFTPusertobeabletocreate

#newdirectories.

#anon_mkdir_write_enable=YES

#

#Activatedirectorymessages-messagesgiventoremoteuserswhenthey

#gointoacertaindirectory.

dirmessage_enable=YES

#

#Activateloggingofuploads/downloads.

xferlog_enable=YES

#

#MakesurePORTtransferconnectionsoriginatefromport20(ftp-data).

connect_from_port_20=YES

#

#Ifyouwant,youcanarrangeforuploadedanonymousfilestobeownedby

#adifferentuser.Note!Using"root"foruploadedfilesisnot

#recommended!

#chown_uploads=YES

#chown_username=whoever

#

#Youmayoverridewherethelogfilegoesifyoulike.Thedefaultisshown

#below.

#xferlog_file=/var/log/vsftpd.log

#

#Ifyouwant,youcanhaveyourlogfileinstandardftpdxferlogformat

#xferlog_std_format=YES

#

#Youmaychangethedefaultvaluefortimingoutanidlesession.

#idle_session_timeout=600

#

#Youmaychangethedefaultvaluefortimingoutadataconnection.

#data_connection_timeout=120

#

#Itisrecommendedthatyoudefineonyoursystemauniqueuserwhichthe

#ftpservercanuseasatotallyisolatedandunprivilegeduser.

#nopriv_user=ftpsecure

#

#EnablethisandtheserverwillrecogniseasynchronousABORrequests.Not

#recommendedforsecurity(thecodeisnon-trivial).Notenablingit,

#however,mayconfuseolderFTPclients.

#async_abor_enable=YES

#

#BydefaulttheserverwillpretendtoallowASCIImodebutinfactignore

#therequest.TurnonthebelowoptionstohavetheserveractuallydoASCII

#manglingonfileswheninASCIImode.

#BewarethatonsomeFTPservers,ASCIIsupportallowsadenialofservice

#attack(DoS)viathecommand"SIZE/big/file"inASCIImode.vsftpd

#predictedthisattackandhasalwaysbeensafe,reportingthesizeofthe

#rawfile.

#ASCIImanglingisahorriblefeatureoftheprotocol.

#ascii_upload_enable=YES

#ascii_download_enable=YES

#

#Youmayfullycustomisetheloginbannerstring:

#ftpd_banner=WelcometoblahFTPservice.

#

#Youmayspecifyafileofdisallowedanonymouse-mailaddresses.Apparently

#usefulforcombattingcertainDoSattacks.

#deny_email_enable=YES

#(defaultfollows)

#banned_email_file=/etc/vsftpd.banned_emails

#

#Youmayrestrictlocaluserstotheirhomedirectories.SeetheFAQfor

#thepossiblerisksinthisbeforeusingchroot_local_useror

#chroot_list_enablebelow.

#chroot_local_user=YES

#

#Youmayspecifyanexplicitlistoflocaluserstochroot()totheirhome

#directory.Ifchroot_local_userisYES,thenthislistbecomesalistof

#userstoNOTchroot().

#chroot_list_enable=YES

#(defaultfollows)

#chroot_list_file=/etc/vsftpd.chroot_list

#

#Youmayactivatethe"-R"optiontothebuiltinls.Thisisdisabledby

#defaulttoavoidremoteusersbeingabletocauseexcessiveI/Oonlarge

#sites.However,somebrokenFTPclientssuchas"ncftp"and"mirror"assume

#thepresenceofthe"-R"option,sothereisastrongcaseforenablingit.

#ls_recurse_enable=YES

#

#

#Debiancustomization

#

#Someofvsftpd'ssettingsdon'tfittheDebianfilesystemlayoutby

#default.ThesesettingsaremoreDebian-friendly.

#

#Thisoptionshouldbethenameofadirectorywhichisempty.Also,the

#directoryshouldnotbewritablebytheftpuser.Thisdirectoryisused

#asasecurechroot()jailattimesvsftpddoesnotrequirefilesystem

#access.

secure_chroot_dir=/var/run/vsftpd

#

#ThisstringisthenameofthePAMservicevsftpdwilluse.

pam_service_name=vsftpd

#

#ThisoptionspecifiesthelocationoftheRSAcertificatetouseforSSL

#encryptedconnections.

rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem

#ThisoptionspecifiesthelocationoftheRSAkeytouseforSSL

#encryptedconnections.

rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值