如何使用Windows Server 2003中的命令行添加文件权限?

我已经尝试在Windows Server 2003计算机上使用xcacls和cacls,但是当我使用/ g时,它们全部replace了现有的权限。 有谁知道一个命令行工具,只会添加权限?

确保你一起使用/ G / E (编辑模式)(最可能是/ T)。

作为参考,这里是从命令CACLS /?完整的使用信息CACLS /?

 CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user [...]] [/P user:perm [...]] [/D user [...]] filename Displays ACLs. /T Changes ACLs of specified files in the current directory and all subdirectories. /E Edit ACL instead of replacing it. /C Continue on access denied errors. /G user:perm Grant specified user access rights. Perm can be: R Read W Write C Change (write) F Full control /R user Revoke specified user's access rights (only valid with /E). /P user:perm Replace specified user's access rights. Perm can be: N None R Read W Write C Change (write) F Full control /D user Deny specified user access. Wildcards can be used to specify more that one file in a command. You can specify more than one user in a command. Abbreviations: CI - Container Inherit. The ACE will be inherited by directories. OI - Object Inherit. The ACE will be inherited by files. IO - Inherit Only. The ACE does not apply to the current file/directory. 

您也可以尝试使用名为SetACL.exe的helgeklein.com中的工具。 非常强大的工具,试试吧。

如果你看看CACLS,不要忘记看看ICACLS