- Navigate to the required file share → Right-click it and select "Properties" → Go to the "Security" tab → Click the "Advanced" button → Go to the "Auditing" tab → Click the "Add" button → Select the following:
- Principal: "Everyone"
- Type: "All"
- Applies to: "This folder, subfolders and files"
- Advanced Permissions: "Delete subfolders and files" and "Delete"
- Run gpedit.msc → Create and edit a new GPO → Go to “Computer Configuration” → Open “Policies” → Navigate to “Windows Settings” → Select “Security Settings” → Go to “Local Policies” → Select “Audit Policy” → Under “Audit object access”, select the “Success” and “Failure” checkboxes.
- Go to "Advanced Audit Policy Configuration" → Select “Audit Policies” → Choose “Object Access” → Under “Audit File System”, select the “Success” and “Failure” checkboxes → Under “Audit Handle Manipulation”, select the “Success” and “Failure” checkboxes.
- Link the new GPO to your file server and force the Group Policy update.
- Open the Powershell ISE → Create a new script with the following code and run it, specifying the name of your file server and changing the timeframe if needed (86400000ms covers the last 24 hours):
Get-WinEvent -ComputerName fs1 -LogName Security -FilterXPath "*[System[EventID=4670 and TimeCreated[timediff(@SystemTime) <= 86400000]] and EventData[Data[@Name='ObjectType']='File']]" | fl | Out-File c:\data\permission_c.txt
- Open the text file produced by the script.
- Run Netwrix Auditor → Navigate to “Reports” → Expand the “File Servers” section → Go to “File Servers Activity” → Select “Permissions Changes” → Click “View”.
- To save the report, click the "Export" button → Choose a format from the dropdown menu → Click “Save”.
- To receive the report regularly by email, click the “Subscribe” button and choose the schedule you prefer.