I need to disable the zsh's COMPFIX process to suppress the following warning I see every time I open a terminal window:
zsh compinit: insecure directories and files, run compaudit for list.
The cause of the warning is not the issue here; I have two admin users on the same Macbook who both need to use homebrew. When files in /usr/local have group read/write privileges rather than single user privileges, the COMPFIX process flags them as insecure.
Other solutions suggest adding ZSH_DISABLE_COMPFIX=true
to the top of my .zshrc
file. I have done this and I still see the error. There are multiple .zshrc
-like files in my home directory, including .zshrc.pre-oh-my-zsh
and .zshrc~
, and have tried adding ZSH_DISABLE_COMPFIX=true
to each of these too, without success.
How can I successfully turn off this warning?
Try to add it at the beginning of the .zshrc file, before sourcing oh-my-zsh
and put it in quotes like: ZSH_DISABLE_COMPFIX="true"