zsh compinit: insecure directories

前端 未结 23 2229
攒了一身酷
攒了一身酷 2021-01-29 17:22

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 compini         


        
23条回答
  •  长发绾君心
    2021-01-29 17:44

    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:

    # There are insecure files: /usr/share/zsh/vendor-completions/_code
    # sudo ls -alh
    -rw-r--r-- 1  131  142 2.6K 2019-10-10 16:28 _code
    

    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 and 142 back to root, this error message from zsh went away.

提交回复
热议问题