File Integrity
Track file changes with baseline snapshots, comparisons, and unified diffs.
File Integrity Monitoring
Detect unauthorized changes to your PrestaShop files by comparing against a known-good baseline.
Creating a Snapshot
A snapshot records the state of every file in your installation:
- Go to the Snapshots tab
- Click Create Snapshot
- Optionally enable Store File Content for line-by-line diff support
- Wait for the snapshot to complete
The snapshot stores for each file:
- File path
- File size
- Last modification timestamp
- MD5 hash
- Optionally, full file content (for diff generation)
Running a Comparison
Compare your current filesystem against a snapshot to detect changes:
- Select a snapshot from the list
- Click Compare
- Review the results
Comparison Results
The comparison shows three categories of changes:
Modified Files — Files that exist in both the snapshot and current filesystem but have different content (different MD5 hash). With content storage enabled, you can view a unified diff showing exactly what changed.
New Files — Files that exist on the filesystem but were not in the snapshot. These could be legitimate additions (like new modules) or potentially malicious uploads.
Deleted Files — Files that were in the snapshot but no longer exist. Could indicate cleanup or unauthorized removal.
Actions
For each change detected, you can:
- View Diff — See line-by-line changes (requires content storage)
- Delete New File — Remove files that shouldn't be there
- Restore Modified File — Restore to the snapshot version (requires content storage)
- Authorize Change — Mark the change as legitimate so it doesn't appear in future comparisons
- Image Preview — Side-by-side visual comparison for image files
Comparison History
Every comparison run is saved with a timestamp. You can review past comparisons to track how your filesystem has changed over time.
Best Practices
- Create a baseline snapshot right after a clean install or update — this gives you a known-good reference point
- Enable content storage for the most useful diffs (uses more disk space)
- Run comparisons regularly via cron to catch changes early
- Authorize legitimate changes after updates to keep comparison results clean
