童年原是一生最美妙的阶段,那时的孩子是一朵花,也是一颗果子,是一片懵懵懂懂的聪明,一种永远不息的活动,一股强烈的欲望。——巴尔扎克
现在位置:首页 > 网站建设 > 建站知识 > WIN2003IIS最小权限分配

WIN2003IIS最小权限分配

玉龙之乡  建站知识  2015-8-28  17139  0评论

将下面的代码放到一个批处理文件里,在服务器上执行即可。

@echo off

echo "虚拟主机C盘权限设定"

echo "Author:server120.cn"

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 "添加iis_wpg的访问权限"

cacls "%SystemRoot%" /g iis_wpg:r /e

cacls "%SystemDrive%/Program Files/Common Files" /g iis_wpg:r /e

cacls "%SystemRoot%/Downloaded Program Files" /g iis_wpg:c /e

cacls "%SystemRoot%/Help" /g iis_wpg:c /e

cacls "%SystemRoot%/IIS Temporary Compressed Files" /g iis_wpg:c /e

cacls "%SystemRoot%/Offline Web Pages" /g iis_wpg:c /e

cacls "%SystemRoot%/System32" /g iis_wpg:c /e

cacls "%SystemRoot%/Tasks" /g iis_wpg:c /e

cacls "%SystemRoot%/Temp" /g iis_wpg:c /e

cacls "%SystemRoot%/Web" /g iis_wpg:c /e

echo "添加iis_wpg的访问权限[.net专用]"

cacls "%SystemRoot%/Assembly" /g iis_wpg:c /e

cacls "%SystemRoot%/Microsoft.NET" /g iis_wpg:c /e

echo "添加iis_wpg的访问权限[装了MACFEE的软件专用]"

cacls "%SystemDrive%/Program Files/Network Associates" /g iis_wpg:r /e

echo "添加users的访问权限"

cacls "%SystemRoot%/temp" /g users:c /e

评论一下 分享本文 联系站长
草原上的建筑- 草原上的建筑模型-玉龍之鄉
看完文章就评论一下!
挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
提交评论

清空信息
关闭评论

sitemap