Skip to content

Real-time network monitor + outbound firewall — see & block every connection. Privacy-first, local-first, Rust fleet agent, SIEM exports, 8 languages. / Moniteur réseau temps réel + pare-feu sortant, agent de flotte Rust, exports SIEM. 100 % local.

Fail loudly when data dir is root-owned, fix macOS install notes

MoneyLisaa5ab61356901
diff --git a/electron/main.js b/electron/main.js
index aefc9e9..7d80fd1 100644
--- a/electron/main.js
+++ b/electron/main.js
@@ -716,6 +716,25 @@ function shutdownBackend() {
// ── App lifecycle / Cycle de vie de l'application ────────────────────────────
app.whenReady().then(async () => {
+ // EN: Guard: when a previous ELEVATED run left the data dir root-owned,
+ // Chromium cannot write its caches and the app dies SILENTLY — no
+ // window, no error. Detect it up front and tell the user how to fix.
+ // FR: Garde-fou : quand un lancement ÉLEVÉ précédent a laissé le dossier
+ // de données possédé par root, Chromium ne peut plus écrire ses caches
+ // et l'app meurt EN SILENCE — pas de fenêtre, pas d'erreur. Détecter
+ // en amont et expliquer la réparation.
+ try {
+ fs.accessSync(app.getPath('userData'), fs.constants.W_OK)
+ } catch {
+ const dataPath = app.getPath('userData')
+ dialog.showErrorBox('Snitch',
+ `Cannot write to the data folder (leftover root-owned files from an earlier elevated run).\n` +
+ `Impossible d'écrire dans le dossier de données (fichiers restés propriété de root après un lancement élevé).\n\n` +
+ `Fix / Réparer :\n sudo chown -R $USER "${dataPath}"\n ${'or / ou'} : rm -rf "${dataPath}"`)
+ app.quit()
+ return
+ }
+
// EN: On Windows, Npcap is a hard requirement — guide the user to npcap.com
// (it is deliberately NOT bundled; see licensing notes).
// FR: Sous Windows, Npcap est obligatoire — guider l'utilisateur vers
diff --git a/packaging/release-notes.md b/packaging/release-notes.md
index 98cd2d6..5271cb8 100644
--- a/packaging/release-notes.md
+++ b/packaging/release-notes.md
@@ -5,7 +5,7 @@ Pick the file for your system, then follow the two-line install steps below.
| Your system | Download | Install |
|---|---|---|
| **Windows 10/11** | `Snitch-Setup-windows.exe` | Double-click the installer. Windows SmartScreen may warn (the app is not code-signed yet): click **More info -> Run anyway**. |
-| **macOS (Apple Silicon)** | `Snitch-macos-arm64.dmg` | Open the `.dmg`, drag Snitch into Applications. On first launch, right-click the app -> **Open** -> **Open** (Gatekeeper warning, app not notarised yet). |
+| **macOS (Apple Silicon)** | `Snitch-macos-arm64.dmg` | Open the `.dmg`, drag Snitch into Applications. The app is not notarised yet, so macOS may say it is "damaged": run `xattr -dr com.apple.quarantine /Applications/Snitch.app` in Terminal, then launch normally. |
| **Linux, easiest** | `Snitch-x86_64.AppImage` | `chmod +x Snitch-x86_64.AppImage` then double-click or run it. |
| **Linux, Debian/Ubuntu** | `snitch-linux-amd64.deb` | `sudo apt install ./snitch-linux-amd64.deb` |
| **Linux, Snap** | `snitch-linux-amd64.snap` | `sudo snap install --dangerous snitch-linux-amd64.snap` |
@@ -25,7 +25,7 @@ Choisissez le fichier correspondant a votre systeme, puis suivez les etapes d'in
| Votre systeme | Fichier | Installation |
|---|---|---|
| **Windows 10/11** | `Snitch-Setup-windows.exe` | Double-cliquez sur l'installateur. SmartScreen peut afficher un avertissement (l'application n'est pas encore signee) : cliquez sur **Informations complementaires -> Executer quand meme**. |
-| **macOS (Apple Silicon)** | `Snitch-macos-arm64.dmg` | Ouvrez le `.dmg`, glissez Snitch dans Applications. Au premier lancement : clic droit sur l'app -> **Ouvrir** -> **Ouvrir**. |
+| **macOS (Apple Silicon)** | `Snitch-macos-arm64.dmg` | Ouvrez le `.dmg`, glissez Snitch dans Applications. L'app n'est pas encore notarisee, macOS peut la dire « endommagee » : lancez `xattr -dr com.apple.quarantine /Applications/Snitch.app` dans le Terminal, puis ouvrez normalement. |
| **Linux, le plus simple** | `Snitch-x86_64.AppImage` | `chmod +x Snitch-x86_64.AppImage` puis double-cliquez ou lancez-le. |
| **Linux, Debian/Ubuntu** | `snitch-linux-amd64.deb` | `sudo apt install ./snitch-linux-amd64.deb` |
| **Linux, Snap** | `snitch-linux-amd64.snap` | `sudo snap install --dangerous snitch-linux-amd64.snap` |