What does it mean and how can I fix it?
zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?
Running the compaudit
returns the follows:
There are insecure directories:
/usr/local/share/zsh/site-functions
This fixed it for me:
Credit: a post on zsh mailing list
EDIT: As pointed out by @biocyberman in the comments. You may need to update the owner of
site-functions
as well:On my machine (OSX 10.9), I do not need to do this but YMMV.
EDIT2: On OSX 10.11, only this worked:
Also user:staff is the correct default permission on OSX.
These two lines have fixed for me.
This morning, some packages in my system updated, and left me with this error message. I am using Ubuntu 18.04.
Apparently, something in the update changed the username and group to numbers, instead of
root
, as so:I simply changed the user and group for this file back to
root
and the problem went away. I did not need to change any permissions, and would caution against doing so unless the underlying cause of the problem is understood.sudo chown root _code && sudo chgrp root _code
After switching
131
and142
back toroot
, this error message from zsh went away.My suggestion would be to run compaudit and then just fix permissions on the directories found by the audit. Make sure the identified directories do not have write permissions for group or other.
The accepted answer did not work for me on macOs Sierra (10.12.1). Had to do it recursive from /usr/local
Note: You can get your username with
whoami
and your group withid -g
This works for my Mac after the update to High Sierra.
Remove group write access:
It’s best to keep the change limited to the scope of zsh directories.