14

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?

jonsanders101
  • 525
  • 1
  • 6
  • 13

3 Answers3

33

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"

E.FU
  • 390
  • 3
  • 5
6

You likley just need to place true in quotes like so: ZSH_DISABLE_COMPFIX="true"

Then reload your zsh settings with source ~/.zshrc

cjmaria
  • 330
  • 4
  • 16
1

I had to add ZSH_DISABLE_COMPFIX="true" to my z.sh file (with or without quotes worked). Adding it to .zshrc file gave me an error message.

bgrigs
  • 11
  • 1