{"record":{"id":"eb13288ac1ef8e0d","repo":"stamparm/maltrail","slug":"missing-user-ignorelist-file","errorCode":null,"errorMessage":"missing 'USER_IGNORELIST' file '{}'","messagePattern":"missing 'USER_IGNORELIST' file '(.+?)'","errorType":"validation","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"sensor/src/config.rs","lineNumber":826,"sourceCode":"            } else if v.contains(',') {\n                crate::cprintln!(\"[x] configuration value 'USER_WHITELIST' has been changed. Please use it to set location of whitelist file\");\n                None\n            } else {\n                let p = normalize_path(&root, &v);\n                if !p.is_file() {\n                    bail!(\"missing 'USER_WHITELIST' file '{}'\", p.display());\n                }\n                Some(p)\n            }\n        };\n        let user_ignorelist = {\n            let v = get_str(&raw, \"USER_IGNORELIST\");\n            if v.is_empty() {\n                None\n            } else {\n                let p = normalize_path(&root, &v);\n                if !p.is_file() {\n                    bail!(\"missing 'USER_IGNORELIST' file '{}'\", p.display());\n                }\n                Some(p)\n            }\n        };\n\n        let trails_file = {\n            let v = get_str(&raw, \"TRAILS_FILE\");\n            if v.is_empty() {\n                let home = std::env::var(\"HOME\").unwrap_or_default();\n                PathBuf::from(format!(\"{home}/.maltrail/trails.csv\"))\n            } else {\n                normalize_path(&std::env::current_dir().unwrap_or_else(|_| root.clone()), &v)\n            }\n        };\n\n        let process_count = get_u64(&raw, \"PROCESS_COUNT\").filter(|v| *v > 0).unwrap_or(cpu_count() as u64) as u32;\n\n        let disabled_heuristics: Vec<String> = {","sourceCodeStart":808,"sourceCodeEnd":844,"githubUrl":"https://github.com/stamparm/maltrail/blob/77cfb06d7606506d101bbcec0786c77166c4255e/sensor/src/config.rs#L808-L844","documentation":"Configuration validation in the sensor's config loader: the USER_IGNORELIST entry must resolve, after normalize_path(root, v), to an existing regular file, because the sensor reads the ignorelist from disk at startup to filter user activity. This fires when the ignorelist path is empty-resolved to a missing file, the filename is misspelled, the file was deleted/moved, or the path is relative to the wrong root. Using anyhow's bail!, it aborts configuration processing so the sensor never runs with a silently empty ignorelist. Fix by correcting the USER_IGNORELIST path in the config to point at an existing file (or removing the entry if the section legitimately resolves to None).","triggerScenarios":"USER_IGNORELIST pointing to a nonexistent or non-file path: filename typo, file removed after config was written, relative path resolving against the wrong root, or the value accidentally holding a directory path.","commonSituations":"Deployment pipelines that copy configs but not data files; hosts rebuilt without restoring ignore lists; path changed after a package update moved the sensor config; permissions making the file invisible to stat (is_file fails).","solutions":["Create the ignore-list file at the path shown in the error or correct the USER_IGNORELIST value.","Use an absolute path to avoid dependence on the config root resolution.","Verify the path refers to a regular file and that the sensor user can stat/read it.","Remove or empty the option if no ignore list is needed."],"exampleFix":"// before (config.conf)\nUSER_IGNORELIST=ignorelist.txt   // missing file\n\n// after (config.conf)\nUSER_IGNORELIST=/etc/sensor/user_ignorelist.txt\n# ensure the file exists and is readable by the sensor","handlingStrategy":"validation","validationCode":"let v = get_str(&raw, \"USER_IGNORELIST\");\nif !v.is_empty() {\n    let p = normalize_path(&root, &v);\n    if !p.is_file() {\n        eprintln!(\"USER_IGNORELIST file does not exist: {}\", p.display());\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use absolute paths for list files.","Back up and restore list files during host rebuilds.","Confirm the sensor service user can stat/read the file.","Empty the option rather than pointing it at a placeholder path."],"tags":["rust","configuration","filesystem"],"backgroundTag":"file-not-found","analyzedSha":"77cfb06d7606506d101bbcec0786c77166c4255e","analyzedAt":"2026-09-13T03:50:16.010Z","contentChangedAt":"2026-09-13T03:50:16.010Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}