# zsh: compinit: insecure directories, run compaudit for list. Ignore insecure directories and continue [y] or abort compinit [n]?

**Code:** `zsh compinit: insecure directories` · **Category:** macOS · **Seen on:** macOS

zsh refuses to load completions from directories owned by another user or writable by others.

## 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

1. `compaudit | xargs chmod g-w,o-w`
2. `sudo chown -R $(whoami) $(brew --prefix)/share/zsh`
3. As a last resort `compinit -u` in `.zshrc`

## Detailed fix by platform

### macOS

1. `compaudit` lists insecure paths

## How to diagnose

1. **Paths** — compaudit output?
2. **Owner** — Your user?
3. **Perms** — Group/other writable?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/macos/zsh-compinit-insecure-directories)
