owasp-amass/amass · error
unable to load the file in the bruteforce wordlist_file sett
Error message
unable to load the file in the bruteforce wordlist_file setting: %s: %v
What it means
In loadBruteForceSettings, after resolving the wordlist path, the file is read line-by-line with GetListFromFile. If that fails, the error is wrapped in this message including the absolute path and underlying error. It means the wordlist file referenced by the bruteforce config could not be opened or read.
Source
Thrown at config/brute.go:53
wordlistPaths, ok := wordlistPathRaw.([]interface{})
if !ok {
return fmt.Errorf("bruteforce wordlist_file is not an array")
}
for _, wordlistPathRaw := range wordlistPaths {
wordlistPath, ok := wordlistPathRaw.(string)
if !ok {
return fmt.Errorf("bruteforce wordlist_file item is not a string")
}
absPath, err := c.AbsPathFromConfigDir(wordlistPath)
if err != nil {
return fmt.Errorf("failed to get absolute path for wordlist file: %w", err)
}
wordlist, err := GetListFromFile(absPath)
if err != nil {
return fmt.Errorf("unable to load the file in the bruteforce wordlist_file setting: %s: %v", absPath, err)
}
c.Wordlist = append(c.Wordlist, wordlist...)
}
}
c.Wordlist = stringset.Deduplicate(c.Wordlist)
return nil
}
func (c *Config) loadAlterationSettings(cfg *Config) error {
alterationsRaw, ok := c.Options["alterations"]
if !ok {
return nil
}
alterations, ok := alterationsRaw.(map[string]interface{})
if !ok {View on GitHub (pinned to 79299dce87)
Solutions
- Verify the file exists at the reported absolute path (ls / stat) and fix the path in the config
- Check file permissions so the running user can read the wordlist
- Install or restore the missing wordlist package/file
- Point the entry to a file, not a directory, and pre-test with GetListFromFile before loading the config
Example fix
// before
"wordlists": []interface{}{"/usr/share/wordlists/dirbuster-list.txt"} // file missing
// after
// verify first: os.Stat the path; then
"wordlists": []interface{}{"/usr/share/wordlists/dirb/common.txt"} Defensive patterns
Strategy: validation
Validate before calling
func ensureWordlistReadable(path string) error {
fi, err := os.Stat(path)
if err != nil {
return fmt.Errorf("wordlist %s: %w", path, err)
}
if fi.IsDir() {
return fmt.Errorf("wordlist %s is a directory", path)
}
f, err := os.Open(path)
if err != nil {
return fmt.Errorf("wordlist %s not readable: %w", path, err)
}
return f.Close()
} Type guard
func isReadableFile(p string) bool {
fi, err := os.Stat(p)
return err == nil && !fi.IsDir()
} Try / catch
if err := cfg.LoadSettings(); err != nil {
if strings.Contains(err.Error(), "unable to load the file in the bruteforce wordlist_file setting") {
// stat/open the reported path, fix it, then retry
}
log.Fatal(err)
} Prevention
- Stat every wordlist path before adding it to the config
- Install the OS wordlist packages your configs reference (e.g. wordlists packages on Kali)
- Check file permissions when running as a non-root user
- Point entries at files, never directories, and re-verify paths after moving data
When it happens
Trigger: bruteforce.wordlists contains a path (after resolution) where GetListFromFile fails — the file does not exist, is a directory, or is not readable by the process.
Common situations: Typo'd or stale wordlist paths after moving files; missing OS wordlist packages (e.g. /usr/share/wordlists not installed); permission issues reading a wordlist owned by root; passing a directory instead of a file.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- failed to get absolute path for wordlist file: %w
- the file is empty
- failed to load the configuration file: %v
- error mapping configuration settings to internal values: %v
- failed to parse active setting, value is not a boolean
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/2ed270289260a8a6.
Report an issue: GitHub.