Windows 使用icacls将文件夹的权限设置为递归继承

Windows 使用icacls将文件夹的权限设置为递归继承,windows,icacls,Windows,Icacls,我想将具有特定权限的特定文件夹设置为继承其父文件夹的所有权限。我知道我应该使用icacls 我的文件夹如下所示: - mp - build (set this one to inherit from mp) 像这样: icacls "build\*" /q /c /t /reset 秘密是: /reset - Replaces ACLs with default inherited ACLs for all matching files. /t - Performs the op

我想将具有特定权限的特定文件夹设置为继承其父文件夹的所有权限。我知道我应该使用
icacls

我的文件夹如下所示:

- mp
  - build (set this one to inherit from mp)
像这样:

icacls "build\*" /q /c /t /reset
秘密是:

/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.

上阅读更多信息,我运气不好,使用带有(I)标志的/grant开关获得了“无效参数”,但是/reset工作得很好!谢谢,我错过了帮助中的重置选项。由于/T用于递归,我认为路径中不需要\*。
\*
如果您只想重置子文件夹和文件,而不是构建文件夹本身,则肯定需要\*。否则,生成文件夹将恢复为其父级的继承设置