I have errors with the zsh shell:
zsh compinit: insecure directories and files, run compaudit for list
the files listed with errors are
/usr/local/share/zsh/site-functions
/usr/local/share/zsh
/usr/local/share/zsh/site-functions/_aws
/usr/local/share/zsh/site-functions/_brew
/usr/local/share/zsh/site-functions/_git
People suggest to change the ownership of these to the user having the problem.
sudo chown -R $(whoami):staff /usr/local/share/zsh
But I have multiple users in my mac so this doesn't make sense. Beside /usr/local stuff should be run by any user AFAIK.
Further to this the user with the problem is not in the sudoers list, so if I run the above command with the admin user won't fix it.
Permissions currently look like this
drwxr-xr-x 8 userwithAdmin staff 256 19 Nov 15:18 site-functions
the user with the problem is not userwithAdmin but userB.
Any suggestions?