WIN2003服务器维护IIS最小权限分配的批处理文件_WIN2003服务器维护_黑客防线网安服务器维护基地--Powered by WWW.RONGSEN.COM.CN

WIN2003服务器维护IIS最小权限分配的批处理文件

作者:黑客防线网安IIS服务器维护基地 来源:黑客防线网安IIS教程网 浏览次数:0

本篇关键词:WIN2003服务器维护IIS
黑客防线网安网讯:龙虎鹰师网安技术通过.bat批处理文件实现IIS自动安全设置,使windows 2003的IIS安全设置权限最小。
 @echo off
echo "虚拟主机C盘权限设定"
echo "Author:an85.com"

echo "删除C盘的everyone的权限"
cd/
cacls "%SystemDrive%" /r "everyone" /e
cacls "%SystemRoot%" /r "everyone" /e
cacls "%SystemRoot%/Registration" /r "everyone" /e
cacls "%SystemDrive%/Documents and Settings" /r "everyone" /e

echo "删除C盘的所有的users的访问权限"
cd/
cacls "%SystemDrive%" /r "users" /e
cacls "%SystemDrive%/Program Files" /r "users" /e
cacls "%SystemDrive%/Documents and Settings" /r "users" /e

cacls "%SystemRoot%" /r "users" /e
cacls "%SystemRoot%/addins" /r "users" /e
cacls "%SystemRoot%/AppPatch" /r "users" /e
cacls "%SystemRoot%/Connection Wizard" /r "users" /e
cacls "%SystemRoot%/Debug" /r "users" /e
cacls "%SystemRoot%/Driver Cache" /r "users" /e
cacls "%SystemRoot%/Help" /r "users" /e
cacls "%SystemRoot%/IIS Temporary Compressed Files" /r "users" /e
cacls "%SystemRoot%/java" /r "users" /e
cacls "%SystemRoot%/msagent" /r "users" /e
cacls "%SystemRoot%/mui" /r "users" /e
cacls "%SystemRoot%/repair" /r "users" /e
cacls "%SystemRoot%/Resources" /r "users" /e
cacls "%SystemRoot%/security" /r "users" /e
cacls "%SystemRoot%/system" /r "users" /e
cacls "%SystemRoot%/TAPI" /r "users" /e
cacls "%SystemRoot%/Temp" /r "users" /e
cacls "%SystemRoot%/twain_32" /r "users" /e
cacls "%SystemRoot%/Web" /r "users" /e
cacls "%SystemRoot%/WinSxS" /r "users" /e

cacls "%SystemRoot%/system32/3com_dmi" /r "users" /e
cacls "%SystemRoot%/system32/administration" /r "users" /e
cacls "%SystemRoot%/system32/Cache" /r "users" /e
cacls "%SystemRoot%/system32/CatRoot2" /r "users" /e
cacls "%SystemRoot%/system32/Com" /r "users" /e
cacls "%SystemRoot%/system32/config" /r "users" /e
cacls "%SystemRoot%/system32/dhcp" /r "users" /e
cacls "%SystemRoot%/system32/drivers" /r "users" /e
cacls "%SystemRoot%/system32/export" /r "users" /e
cacls "%SystemRoot%/system32/icsxml" /r "users" /e
cacls "%SystemRoot%/system32/lls" /r "users" /e
cacls "%SystemRoot%/system32/LogFiles" /r "users" /e
cacls "%SystemRoot%/system32/MicrosoftPassport" /r "users" /e
cacls "%SystemRoot%/system32/mui" /r "users" /e
cacls "%SystemRoot%/system32/oobe" /r "users" /e
cacls "%SystemRoot%/system32/ShellExt" /r "users" /e
cacls "%SystemRoot%/system32/wbem" /r "users" /e

echo "添加vhost组的访问权限"
cacls "%SystemRoot%" /g vhost:r /e
cacls "%SystemDrive%/Program Files/Common Files" /g vhost:r /e

cacls "%SystemRoot%/Downloaded Program Files" /g vhost:c /e
cacls "%SystemRoot%/Help" /g vhost:c /e
cacls "%SystemRoot%/IIS Temporary Compressed Files" /g vhost:c /e
cacls "%SystemRoot%/Offline Web Pages" /g vhost:c /e
cacls "%SystemRoot%/System32" /g vhost:c /e
cacls "%SystemRoot%/Tasks" /g vhost:c /e
cacls "%SystemRoot%/Temp" /g vhost:c /e
cacls "%SystemRoot%/Web" /g vhost:c /e

echo "添加vhost组的访问权限[.net专用]"
cacls "%SystemRoot%/Assembly" /g vhost:c /e
cacls "%SystemRoot%/Microsoft.NET" /g vhost:c /e

echo "添加vhost组的访问权限[装了MACFEE的软件专用]"
echo "cacls \"%SystemDrive%/Program Files/Network Associates\" /g vhost:r /e"

echo "添加users的访问权限"
cacls "%SystemRoot%/temp" /g users:c /e

把此内容复制到到记事本改名BAT就OK了(不过要慎用可能影响系统的服务运行)
    黑客防线网安服务器维护方案本篇连接:http://www.rongsen.com.cn/show-17221-1.html
网站维护教程更新时间:2012-09-11 22:21:25  【打印此页】  【关闭
我要申请本站N点 | 黑客防线官网 |  
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479

footer  footer  footer  footer