实现WIN2003 IIS最小权限分配的批处理
程序员文章站
2022-04-29 17:15:49
win2003 iis最小权限分配.bat复制代码 代码如下:@echo off echo "虚拟主机c盘权限设定" ...
win2003 iis最小权限分配.bat
@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 "添加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
复制代码 代码如下:
@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 "添加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
上一篇: vbs wmi获取电脑硬件信息实例
下一篇: 用批处理解锁注册表