仓酷云

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 506|回复: 8
打印 上一主题 下一主题

[其他Linux] 来看看:关于linux服务器下vsftpd的一些成绩

[复制链接]
若天明 该用户已被删除
跳转到指定楼层
楼主
发表于 2015-1-16 11:47:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
看不懂man文档的人.在linux中,命令可分为系统基本命令和应用程序命令.系统基本命令是所有的unix类系统都支持的命令,走到哪都不变,只要是unix类系统上就肯定有.
前段工夫碰着一名牛B的人物,帮我修改了vsftpd基于PAM认证的成绩.明天又碰着N个成绩,好比Accessdenied.和403毛病,没法上传文件等等之类的毛病.因而,只好请这个高人再次出马,协助再次修改.很感激这位牛B人物.在好处年夜于统统的这个X蛋的社会,还能为了我们这群小菜鸟往剖析N个文件..这类精力其实是值得信服.

针对我本人自己呈现的成绩,将高人与我的QQ谈天纪录收拾了一份,然后再加上实践的操纵.终究让我年夜彻年夜悟.如今与人人狠狠的分享这位高人的功效.

用户上传文件会见呈现403大概Accessdenied.

解答:这个次要是权限成绩,在用户vsftpd.conf中加上:anon_umask=022大概anon_umask=133,022指755权限.133指644权限,再将给权限给该文件chmod644XX.php大概chmod644name

用户没法上传文件,呈现550大概是553毛病

多是用户组有成绩.好比你的网站用www这个用户来会见,那末就将vsftpd.conf中的guest_username=XXX改成www

别的贴出来我的vsftpd的设置文件:
.代码以下:

#Exampleconfigfile/etc/vsftpd/vsftpd.conf
#
#Thedefaultcompiledinsettingsarefairlyparanoid.Thissamplefile
#loosensthingsupabit,tomaketheftpdaemonmoreusable.
#Pleaseseevsftpd.conf.5forallcompiledindefaults.
#
#READTHIS:ThisexamplefileisNOTanexhaustivelistofvsftpdoptions.
#Pleasereadthevsftpd.conf.5manualpagetogetafullideaofvsftpds
#capabilities.
#
#AllowanonymousFTP?(Beware-allowedbydefaultifyoucommentthisout).
anonymous_enable=NO
#
#Uncommentthistoallowlocaluserstologin.
local_enable=YES
#
#UncommentthistoenableanyformofFTPwritecommand.
write_enable=YES
#
#Defaultumaskforlocalusersis077.Youmaywishtochangethisto022,
#ifyourusersexpectthat(022isusedbymostotherftpds)
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
#
#Thetargetlogfilecanbevsftpd_log_fileorxferlog_file.
#Thisdependsonsettingxferlog_std_formatparameter
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
#
#Thenameoflogfilewhenxferlog_enable=YESandxferlog_std_format=YES
#WARNING-changingthisfilenameaffects/etc/logrotate.d/vsftpd.log
#xferlog_file=/var/log/xferlog
#
#Switchesbetweenloggingintovsftpd_log_fileandxferlog_filefiles.
#NOwritestovsftpd_log_file,YEStoxferlog_file
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
#
#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
#
#When"listen"directiveisenabled,vsftpdrunsinstandalonemodeand
#listensonIPv4sockets.Thisdirectivecannotbeusedinconjunction
#withthelisten_ipv6directive.
listen=YES
#
#ThisdirectiveenableslisteningonIPv6sockets.TolistenonIPv4andIPv6
#sockets,youmustruntwocopiesofvsftpdwhithtwoconfigurationfiles.
#Makesure,thatoneofthelistenoptionsiscommented!!
#listen_ipv6=YES
pam_service_name=vsftpd
<strong>user_config_dir=/etc/vsftpd/user_config_dir/*基于PAM认证用到的*/
userlist_enable=YES
tcp_wrappers=YES
guest_enable=YES
guest_username=www/*注重这里.很有多是由于你的用户招致你的权限出成绩*/
local_root=/home/www
anon_umask=022/*这里是方才下面提到的权限成绩*/
</strong>


假如你已是利用了RAM认证的.那末你能够参考下我的单个用户的设置.文件以下
.代码以下:

<strong>anon_world_readable_only=NO
write_enable=YES
anon_upload_enable=YES
anon_other_write_enable=YES
local_root=/var/public
anon_mkdir_write_enable=YES
</strong>


写学习日记,这是学习历程的见证,同时我坚持认为是增强学习信念的法宝。以上是我学习Linux的心得体会,希望对大家的学习有所帮助,由于水平有限,本文难免有所欠缺,望请指正。
冷月葬花魂 该用户已被删除
沙发
发表于 2015-1-18 08:15:36 | 只看该作者
你需要提供精确有效的信息。Linux这并不是要求你简单的把成吨的出错代码或者数据完全转储摘录到你的提问中。
蒙在股里 该用户已被删除
板凳
发表于 2015-1-26 12:50:46 | 只看该作者
永中office 2004增强版安装只需要默认安装即可使用并操作大多与win系统雷同,打印机的配置和管理,记录光盘等。
灵魂腐蚀 该用户已被删除
地板
发表于 2015-2-4 19:06:17 | 只看该作者
主流Linux发行版都自带非常详细的文档(包括手册页和FAQ),从系统安装到系统安全,针对不同层次的人的详尽文档,仔细阅读文档后40%问题都可在此解决。
爱飞 该用户已被删除
5#
发表于 2015-2-10 06:05:15 | 只看该作者
写学习日记,这是学习历程的见证,同时我坚持认为是增强学习信念的法宝。
深爱那片海 该用户已被删除
6#
发表于 2015-3-1 00:48:52 | 只看该作者
期间我阅读了不少关于Linux的相关资料,其中也不乏一些有趣的小故事,这既丰富了我的课余生活,也让我加深了对一些术语的理解,比玩游戏强多了。?
柔情似水 该用户已被删除
7#
发表于 2015-3-10 12:23:12 | 只看该作者
放手去搞。尽量不要提问,运用搜索找答案,或者看wiki,从原理上理解操作系统的本质,而不是满足于使用几个技巧。尽量看英文资料。
小魔女 该用户已被删除
8#
发表于 2015-3-17 07:09:50 | 只看该作者
其实老师让写心得我也没怎么找资料应付,自己想到什么就写些什么,所以不免有些凌乱;很少提到编程,因为那些在实验报告里已经说了,这里再写就多余了。
小妖女 该用户已被删除
9#
发表于 2015-3-24 02:06:33 | 只看该作者
在学习的过程中,我们用的是VM虚拟机,开始时真的不真的该怎么去做,特别是我的是命令窗口界面,别人的是图形界面,我都不知道怎么调过来。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|仓酷云 鄂ICP备14007578号-2

GMT+8, 2024-9-27 20:46

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表