Zsh detects insecure completion-dependent directories

泄露秘密 提交于 2021-02-15 11:24:42

问题


I get the following error messages when I open my terminal, Hyper:

[oh-my-zsh] Insecure completion-dependent directories detected:
drwxrwxr-x  7 dwaynethe2nd  admin  224 Apr 25 15:00 /usr/local/share/zsh
drwxrwxr-x  4 dwaynethe2nd  admin  128 Apr 25 14:53 /usr/local/share/zsh/site-functions

回答1:


This is an issue with ZSH, your shell, not Hyper, your terminal. I actually had the same issue earlier today. There are some solutions in this issue on Github, and I will quote some of them here but I recommend you follow the link and read the comments there.

The first solution is to change the ownership of the problematic directories:

chmod 755 /usr/local/share/zsh
chmod 755 /usr/local/share/zsh/site-functions

I will not recommend this without knowing more about your environment, but for most people this will fix the issue.

The second solution is to set ZSH_DISABLE_COMPFIX=true (or "true" in quotes) in your .zshrc file, to tell ZSH to not check for insecure directories.

The third solution, and the solution that fixed the issue for me, is to initialise compinit with the -u flag. This will use all the directories found by compaudit without checking them for security issues. To do this, you will have to change your .zshrc file or wherever you are configuring autocomplete.



来源:https://stackoverflow.com/questions/61433167/zsh-detects-insecure-completion-dependent-directories

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!