icacls拒绝所有人目录删除权限 [英] icacls Deny Everyone Directory Delete Permission
本文介绍了icacls拒绝所有人目录删除权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图拒绝所有用户删除文件夹(如果可能的话,还包括其内容).
I am trying to deny all users from being able to delete a folder (as well as its contents, if possible).
我当前拥有的东西不起作用.
icacls pics /deny Everyone:(OI)(CI)(DE)
使用上面的行既不能保护文件夹也不能保护其内容,因为我仍然可以删除该文件夹及其中的所有文件.
Using the above line neither protects the folder nor its content as I can still delete the folder and all files within it.
推荐答案
我认为我找到了解决方案:
I think i found a solution:
icacls pics /deny Everyone:(OI)(CI)(DE,DC)
拒绝拥有删除 (DE)
和删除孩子 (DC)
的特定权利.
which denies the specific rights to delete (DE)
and to delete childs (DC)
.
- 要独立使用此语言,请使用
*S-1-1-0
而不是Everyone
. (请参见知名的SID ) - 如果该文件夹恰好是空的,您仍然可以删除它.如果存在问题,请考虑设置只读标志,例如
attrib +r pics
,然后拒绝(WA)
,这样就不能更改它(记为
- To get this language independent use
*S-1-1-0
instead ofEveryone
. (see Well-Known SIDs) - You might still be able to remove the folder if it happens to be empty. If that's a problem, consider setting the read-only flag, e.g.,
attrib +r pics
, and then denying(WA)
so it can't be changed (credit to Harry Johnston)
这篇关于icacls拒绝所有人目录删除权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文