具体问题描述如下, 没什么屁用
Last login: Wed Nov 24 16:45:07 on ttys007
[oh-my-zsh] Insecure completion-dependent directories detected:
lrwxr-xr-x 1 root staff 39 9 12 21:07 /usr/local/share/zsh/site-functions/_brew -> ../../../Homebrew/completions/zsh/_brew
lrwxr-xr-x 1 root staff 88 10 1 11:18 /usr/local/share/zsh/site-functions/_brew_services -> ../../../Homebrew/Library/Taps/homebrew/homebrew-services/completions/zsh/_brew_services
[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.
[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh] compaudit | xargs chmod g-w,o-w
[oh-my-zsh] If the above didn't help or you want to skip the verification of
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.
zsh compinit: insecure files, run compaudit for list.
Ignore insecure files and continue [y] or abort compinit [n]?
uploading-image-772656.png
博客园服务器在干啥, 又上传不了图片
在网上搜了办法, 如 https://*.com/questions/13762280/zsh-compinit-insecure-directories,
一般就两步$ sudo chmod -R 755 /usr/local/share/zsh/site-functions
$ sudo chown -R root:root /usr/local/share/zsh/site-functions
但他们只能解决简单的 zsh
和 zsh/site-functions
这两个目录的安全性问题,
解决不了
_brew
_brew_services
(用 compaudit
命令查看的不安全目录)
这两个目录的的安全问题
最后在这上面找到了解决办法, 这位老哥的这两个目录同样遇到了这个问题
https://www.cnblogs.com/r1char/p/13095123.html
执行 sudo chown root /usr/local/share/zsh/site-functions/_brew
_brew_services 同理执行, 完事就好了, 这俩命令有啥不一样可以择时再学习;博客园