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:

  1. Go to the Snapshots tab
  2. Click Create Snapshot
  3. Optionally enable Store File Content for line-by-line diff support
  4. 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:

  1. Select a snapshot from the list
  2. Click Compare
  3. 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

  1. Create a baseline snapshot right after a clean install or update — this gives you a known-good reference point
  2. Enable content storage for the most useful diffs (uses more disk space)
  3. Run comparisons regularly via cron to catch changes early
  4. Authorize legitimate changes after updates to keep comparison results clean