windows 使用 icacls 设置文件夹的权限以递归继承
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22327776/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 11:27:04 来源:igfitidea点击:
Using icacls to set permissions of a folder to inherit recursively
提问by Asken
I want to set a specific folder with specific rights to inherit all rights of it's parent folder. I know I should use icacls
.
我想设置一个具有特定权限的特定文件夹来继承其父文件夹的所有权限。我知道我应该使用icacls
.
My folders look like this:
我的文件夹如下所示:
- mp
- build (set this one to inherit from mp)
回答by Asken
Like this:
像这样:
icacls "build\*" /q /c /t /reset
The secret was:
秘密是:
/reset - Replaces ACLs with default inherited ACLs for all matching files.
/t - Performs the operation on all specified files in the current directory and its subdirectories.
Read more at Microsoft Technet icacls
在Microsoft Technet icacls阅读更多信息