Step 1: Enable 'Audit object access' policy
Launch the Group Policy Management console (Run --> gpedit.msc)
Create a new GPO and link it to the domain containing the file server or edit the existing GPO that is linked to the relevant domain.
Navigate to Computer Configuration -> Windows Settings -> Security Settings ->Local Policies -> Audit Policy.
Under Audit Policy, select 'Audit object access' and turn auditing on for both success and failure.
Navigate to Advanced Audit Policy Configuration -> Audit Policies-> Object access. Turn on auditing for 'Audit file system' and 'Audit handle manipulation'.
Step 2: Edit auditing entry in the respective file/folder
Locate the file or folder for which you wish to track all the accesses. Right click on it and go to Properties. Under the Security tab click Advanced.
In Advanced Security Settings, go to the Auditin tab and click Add to add a new auditing entry.
In the Auditing Entry for Active Directory dialog box, enter the following details:
- Principal: Enter the names of the users whose access you wish to audit.
- Type: Select the type of access you want to audit. It is preferable to audit "All" changes.
- Applies to: Select whether you want to audit access only on this file, or on all sub folders and files.
- Basic permissions: Choose the types of permissions you want to audit. Click the Advanced permissions button and choose “Traverse Folder/Execute File”, “List Folder/Read data”, “Read attributes”, and “Read extended attributes” .
Step 3: View audit logs in Event Viewer
Every time a user accesses the selected file/folder, and changes the permission on it, an event log will be recorded in the Event Viewer. To view this audit log, go to the Event Viewer. Under Windows Logs, select Security. You can find all the audit logs in the middle pane as displayed below.
To filter the event logs to view just the logs about the file/folder permission changes, select Filter Current Log from the right pane. Simply search for the event ID 4656 and 4663 which indicate file/folder permission changes. You can see who accessed the file in “Account Name” field and access time in “Logged” field.