I'm aware there are many copies of this question here, but all of their answers recommend adding
ZSH_DISABLE_COMPFIX="true"
to the top of my ~/.zshrc file. I have done this and still every time I open zsh I am greeted with
zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?
It seems that others asking this question didn't have the quotes around the true in the first sample, but I have added that. I have also run source ~/.zshrc Which as far as I can tell reloads the zshrc configuration. This still gives me the above warning. I'm not sure if any of these details could be relevant but I'll include them:
Any idea how to resolve this permissions issue? Thanks
Edit:
compaudit returns
/usr/local/share/zsh/site-functions
/usr/local/share/zsh
Also, here are the other nonstandard entries in my ~/.zshrc file (in order, but there is some built-in stuff inbetween):
ZSH_DISABLE_COMPFIX="true"
export NVM_DIR=~/.nvm
source $(brew --prefix nvm)/nvm.sh
export PATH="/usr/local/opt/icu4c/bin:$PATH"
export PATH="/usr/local/opt/icu4c/sbin:$PATH"
export PATH=$HOME/bin:/usr/local/bin:$PATH
plugins=(git)
source $ZSH/oh-my-zsh.sh
zstyle :compinstall filename '/Users/jonahsaltzman/.zshrc'
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
autoload -Uz compinit
compinit
First of all, one problem here is that you run compinit
twice: Once through Oh-My-Zsh (when you do source $ZSH/oh-my-zsh.sh
) and once manually. You have two options to fix this:
.zshrc
file.plugins=(git)
and source $ZSH/oh-my-zsh.sh
.Secondly, note that $ZSH_DISABLE_COMPFIX
is specific to Oh-My-Zsh and is not used by compinit
itself. It has no effect when you call compinit
manually. You can remove it from your .zshrc
.
Finally, compinit
doesn’t show that warning for nothing. Rather than suppress it, you should instead do chmod g-w,o-w
on the directories listed by compaudit
. That will fix the problem and make the warning go away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With