Best way to manipulate Windows ACL permissions

风格不统一 提交于 2019-12-23 03:12:58

问题


My goal is to find out how to programmatically adjust permissions on files & directories in Windows using .NET.

I have identified the following options:

  1. Windows API (yuck!)
  2. Active Directory Service Interfaces (COM... ugh...)
  3. Windows PowerShell (?)
  4. Google for an easy-to-use facade.

None of these seem very palatable to me. Which route would you guys take? Perhaps there's another way?


回答1:


You can do this type of thing using the FileSecurity class



来源:https://stackoverflow.com/questions/1278099/best-way-to-manipulate-windows-acl-permissions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!