本帖最后由 buyiyang 于 2023-3-9 18:12 编辑
因为administrators的权限是继承而来的,所以无法更改,要先将权限改为显式权限然后才能更改- SetACL -on "%ff%" -ot reg -actn setprot -op "dacl:p_c;sacl:p_c" -actn ace -ace "n:Administrators;p:full;m:set;i:so,sc"
复制代码 说明如下:- Protection
- Controls the flag ‘allow inheritable permissions from the parent object to propagate to this object’:
- nc
- Do not change the current setting.
- np
- Object is not protected, i.e. inherits from parent.
- p_c
- Object is protected, ACEs from parent are copied.
- p_nc
- Object is protected, ACEs from parent are not copied
复制代码
|