[英]Traverse Windows directory tree and retrieve permissions for each folder
I need a program that will traverse a given directory tree on Windows 2003 Server (or compatible) and return Groups and Users that have access to each folder. 我需要一个程序,该程序将遍历Windows 2003 Server(或兼容)上的给定目录树,并返回有权访问每个文件夹的“组”和“用户”。 I also need the exact permissions for each user that has access to the folder. 我还需要每个有权访问该文件夹的用户的确切权限。 The output should be a text file containing any usable format, csv, json or xml, etc. 输出应该是包含任何可用格式的文本文件,例如csv,json或xml等。
If such a program is not freely available, I need a direction on what Windows functions to use to retrieve security information. 如果没有免费提供的此类程序,则需要有关要使用哪些Windows函数来检索安全信息的指导。 I'm on Visual Studio 2012 and I already have the algorithm to traverse a tree structure. 我在Visual Studio 2012上,并且已经有了遍历树结构的算法。 I need to know how to retrieve security information from a folder. 我需要知道如何从文件夹中检索安全信息。
Try the link below. 请尝试下面的链接。 It doesn't export it to a csv file, although you could modify the bat file to do so. 尽管您可以修改bat文件,但它不会将其导出到csv文件。
http://www.windowsitpro.com/article/tips/jsi-tip-0596-how-do-i-print-the-permissions-on-a-directory-tree- http://www.windowsitpro.com/article/tips/jsi-tip-0596-how-do-i-print-the-permissions-on-a-directory-tree-
I just tried it and the output looks like this 我只是尝试了,输出看起来像这样
i:\MyDirectory\SomeDirectory BUILTIN\Administrators:F
BUILTIN\Administrators:(OI)(CI)(IO)F
NT AUTHORITY\SYSTEM:F
NT AUTHORITY\SYSTEM:(OI)(CI)(IO)F
NT AUTHORITY\Authenticated Users:C
NT AUTHORITY\Authenticated Users:(OI)(CI)(IO)C
BUILTIN\Users:R
BUILTIN\Users:(OI)(CI)(IO)(special access:)
GENERIC_READ
GENERIC_EXECUTE
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.