监控文件夹权限

发布于 2024-07-18 07:40:19 字数 129 浏览 4 评论 0原文

任何人都知道我们如何监控 Windows 上的文件/文件夹权限。 假设用户可以更改文件夹权限,应用程序可以记录用户、时间和其他详细信息。

如果 neone 知道相同的第三方工具/脚本,请建议。

-谢谢

Anyone know how can we moniter file /folder permission on windows. Suppose a user can change the folder permission, the application can log the user, timing and other details.

If neone know third party tool/script for the same, plz suggest.

-Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

莳間冲淡了誓言ζ 2024-07-25 07:40:19

您需要使用 FileSystemWatcher 类,当目录或文件的各种属性发生更改时可以引发事件。 就您而言,您需要确保设置 < code>NotifyFilter 属性以包含 NotifyFilters.Security 标志,指示监视任何权限更改。 MSDN 页面上给出了一些很好的示例代码,尽管 FileSystemWatcher 使用起来确实非常简单。

You'll want to use the FileSystemWatcher class, which can raise an event when various properties of directories or files change. In your case, you want to insure you set the NotifyFilter property to include the NotifyFilters.Security flag, which tells is to watch any permissions changes. Some good example code is given on the MSDN page, though FileSystemWatcher is really quite straightforward to use.

睫毛溺水了 2024-07-25 07:40:19

启用文件系统审核,并在父文件夹上设置 SACL 以审核权限和所有权更改。 它们将在系统事件日志中报告。

Enable filesystem auditing, and set the SACL on a parent folder to audit permission and ownership changes. They will be reported in the System event log.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文