ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

oh-my-zsh 每次打开出现 zsh compinit: insecure files, run compaudit for list. Ignore insecure files and con

2021-11-24 19:35:26  阅读:203  来源: 互联网

标签:files .. oh zsh insecure compinit brew my directories


具体问题描述如下, 没什么屁用

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://stackoverflow.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

但他们只能解决简单的 zshzsh/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 同理执行, 完事就好了, 这俩命令有啥不一样可以择时再学习;博客园

标签:files,..,oh,zsh,insecure,compinit,brew,my,directories
来源: https://www.cnblogs.com/misection/p/15599681.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有