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

1.4k Views Asked by At

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.

1

There are 1 best solutions below

1
On

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.