?? 248.html
字號:
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>www.newok.com::FreeBSD使用大全</title>
<link rel=stylesheet href="newok.css" tppabs="http://www.newok.com/include/newok.css">
</head>
<body>
<div align=center>
<p> </p>
<table width=720>
<tr><td>
<strong>當(dāng)前所在位置:</strong><a href="javascript:if(confirm('http://www.at.china.com/bsd/index.html \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.at.china.com/bsd/index.html'" tppabs="http://www.at.china.com/bsd/index.html" class=t1>FreeBSD使用大全>></a>
</td></tr>
</table>
<table width=700>
<tr><th><font color=white>FreeBSD連載(89):CGI和SSI的安全性</font></th></tr>
<tr><td> </td></tr>
<tr><td align=left><i>作者:</i>王波</td></tr>
<tr><td> </td></tr>
<tr><td><font color=white>允許根據(jù)用戶的請求而在服務(wù)器上運(yùn)行程序,本身就是一種安全漏洞,因此只有在必要時,才允許用戶使用這些功能。<br><br> 對于SSI,安全問題比較簡單,可以將其設(shè)置為只分析普通標(biāo)志,不執(zhí)行外部程序,這必須在配置文件中使用 Options IncludesNOEXEC選項(xiàng),而非Options Includes選項(xiàng)。就能滿足對安全性的一般要求。<br><br> CGI程序的情況更為復(fù)雜。由于CGI可以用兩種方式設(shè)置,一種為由ScriptAlias設(shè)置CGI程序的路徑,另一種為通過設(shè)置CGI的后綴而設(shè)置的。通常只有在信任用戶有能力創(chuàng)建沒有(或很少)漏洞的CGI程序時,才使用后綴確認(rèn)CGI程序。否則將會產(chǎn)生一些很糟糕的CGI程序,使得系統(tǒng)很容易被攻擊。因此將CGI程序限制在一些固定目錄下的做法更為常見,這至少讓一個CGI程序經(jīng)過服務(wù)器管理員的一些檢查,避免明顯的漏洞。<br><br> CGI程序的另一個問題是,如果CGI程序要保存瀏覽器客戶發(fā)布的數(shù)據(jù),那么它就要訪問系統(tǒng)的文件系統(tǒng)。通常 Apache服務(wù)器使用User和Group配置服務(wù)器運(yùn)行的用戶和組屬性,Apache服務(wù)器啟動的CGI程序缺省也使用這個用戶和組屬性運(yùn)行,也就擁有了這個用戶和組的權(quán)限,可以存取文件系統(tǒng)中的數(shù)據(jù),這就對系統(tǒng)安全造成另一個影響。然而又必須讓CGI程序存取數(shù)據(jù)文件,因此就要適當(dāng)調(diào)整User和Group的設(shè)置,使得它能夠存取合適的數(shù)據(jù)文件。<br><br> 即使如此,由于所有的CGI程序都以同樣的用戶執(zhí)行,那么不同用戶的CGI就能相互操作別的用戶的數(shù)據(jù)文件,從而造成安全問題。為了使得不同的用戶以不同的用戶身份執(zhí)行CGI,就需要使用程序的SetUID功能。因?yàn)镾etUID 會帶來極大的系統(tǒng)漏洞問題。因此如非必要,不要使用SetUID程序,尤其是root身份的SetUID程序。設(shè)置用戶身份的問題可以使用Apache的suEXEC能力來幫助完成,它首先將身份改變?yōu)楹线m的用戶,再執(zhí)行相應(yīng)的CGI程序。<br><br>未完,待續(xù)。。。</font></td></tr>
<tr><td> </td></tr>
<tr><td align=right><i>來源:</i><a href="javascript:if(confirm('http://freebsd.online.ha.cn/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://freebsd.online.ha.cn/'" tppabs="http://freebsd.online.ha.cn/">http://freebsd.online.ha.cn/</a></td></tr>
</table>
<p> </p>
<p> </p>
<p> </p>
聲明:本站的文章和軟件是本人從網(wǎng)上收集整理的(除本人的作品之外),所有版權(quán)屬于作者,<br>
如有侵犯您的權(quán)益,請指出,本站將立即改正,謝謝.
<hr width=500>
<br>
<font color=#ffffff>Copyright 2000 <a href="javascript:if(confirm('http://www.newok.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.newok.com/'" tppabs="http://www.newok.com/" class=t1>www.newok.com</a></font>
</div>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -