ZSH compinit Related Error after Upgrade to OS X Mavericks

After I upgraded to OS X Mavericks, I started getting the following error when I would $ sudo -s

zsh compinit: insecure directories and files, run compaudit for list.

This function loads tab completions into the ZSH environment. I found details on compinit here. I ran # compaudit and noticed that permissions looked fine, but it seems that in OS X Mavericks, ZSH wants the root user to have group permissions to my user's completion files. I am not sure yet why this wasn't a problem with OS X Mountain Lion.

Based on suggestion in the ZSH documentation referenced above, I change the compinit line in my ~/.zshrc file to compinit -u. This extra switch ignores the security check. While this resolved the warning message, I am not a fan of skipping security checks. I hope to find a better solution. I just figured this may help someone to temporarily hide the message.

Blog Category: