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
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
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.
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.