开发者

Determine if folder ACL was modified since specific date in .NET

I need to determine if folder ACL was modified since specific date. Does Windows store this type of information?

FileSystemInfo provides property LastWriteTime but when I change开发者_运维百科 permissions on directory this date is not changing.

Is there any way to get this information?

Regards, Jack.


The lower-level NT API exposes a field named ChangedTime in the FILE_BASIC_INFORMATION structure; it is described as:

Specifies the last time the file was changed.

It is essentially a time-stamp of when any of the meta-data (which I assume includes the security descriptor) was last modified. Of course you can't tell what was changed that caused the time-stamp to be updated, but I think that's the best you can do out of the box.

There is also the USN Journal, but I believe this feature is disabled by default.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜