zsh: compinit: insecure directories, run compaudit for list. Ignore insecure directories and continue [y] or abort compinit [n]?
zsh refuses to load completions from directories owned by another user or writable by others.
zsh compinit: insecure directories, run compaudit for listzsh: compinit: insecure directoriesIgnore insecure directories and continue [y] or abort compinit [n]?[oh-my-zsh] Insecure completion-dependent directories detected Meaning
Run compaudit to list them, then fix with compaudit | xargs chmod g-w,o-w (and chown if owned by another user). Typical after Homebrew was installed with different ownership. Using compinit -u skips the check but is less secure.
Common causes
- Homebrew share/zsh directories group-writable
- Directories owned by root or another user
- Oh My Zsh folder permissions
- Shared machine/user switch
- Restored backups with different owner
⚡ Quick fix
compaudit | xargs chmod g-w,o-wsudo chown -R $(whoami) $(brew --prefix)/share/zsh- As a last resort
compinit -uin.zshrc
Detailed fix by platform
macOS
compauditlists insecure paths
How to diagnose
- Paths — compaudit output?
- Owner — Your user?
- Perms — Group/other writable?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in macOS
- is damaged and can’t be opened macOS: “App” is damaged and can’t be opened. You should move it to the Trash.
- Operation not permitted (macOS privacy) macOS: Operation not permitted — Terminal/app lacks Full Disk Access (TCC privacy protection)
- git: 'credential-osxkeychain' is not a git command Git: git: 'credential-osxkeychain' is not a git command. See 'git --help'
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026