Moniter folder resolution

Does anyone know how we can control the permission of files / folders for windows. Suppose the user can change the permission of the folder, the application can log the user, time and other data.

If anyone doesn't know a third party tool / script to do this, please suggest plz.

-Thanks

0


a source to share


2 answers


You will want to use a class FileSystemWatcher

that can raise an event when various properties of directories or files change. In your case, you want you to set the property NotifyFilter

to include NotifyFilters.Security

, which indicates to watch for any permission changes. Some good example code is listed on the MSDN page, although it is FileSystemWatcher

really very simple to use.



+3


a source


Enable file system auditing and set SACL on parent folder to check permissions and ownership changes. They will be presented in the system event log.



+1


a source







All Articles