Home > Back-end >  MacOS, insecure files/directory (zsh compinit)
MacOS, insecure files/directory (zsh compinit)

Time:01-26

My shell tells me the following:

❯ compaudit
There are insecure files:
/usr/local/share/zsh/site-functions/_brew

I tried fixing this using $ sudo chmod -R 755 /usr/local/share/zsh/site-functions/_brew and $ sudo chown -R root:staff /usr/local/share/zsh/site-functions/_brew but that didnt help. The only other solution I have found was to add ZSH_DISABLE_COMPFIX=true into my ~./zshrc file. But isnt that just a workaround to ignore the problem?

CodePudding user response:

I found the solution: The file that was making problems (/usr/local/share/zsh/site-functions/_brew) was linking to another file (/usr/local/Homebrew/completions/zsh/_brew).
So I ran these 2 commands and I was fine:

$ sudo chmod -R 755 /usr/local/Homebrew/completions/zsh/_brew
$ sudo chown -R root:staff /usr/local/Homebrew/completions/zsh/_brew

CodePudding user response:

Change directory (cd) into

/usr/local/share/zsh/site-functions/_brew

and then run

sudo chmod -R 755 /usr/local/share/zsh/site-functions/_brew

This worked for me.

  •  Tags:  
  • Related