更新完 zsh 说我目录权限问题的解决

问题

Last login: Mon May 28 13:35:31 on ttys001
You have mail.
[oh-my-zsh] Insecure completion-dependent directories detected:
drwxrwxrwx 7 hans admin 238 2 9 10:13 /usr/local/share/zsh
drwxrwxrwx 6 hans admin 204 10 1 2017 /usr/local/share/zsh/site-functions

[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.

解决方法
终端的执行下面两行就OK了!

chmod 755 /usr/local/share/zsh
chmod 755 /usr/local/share/zsh/site-functions
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在Linux中,当你在使用zsh终端时,遇到"zsh: 权限不够"的错误提示,这通常表示你没有足够的权限来执行所需的操作。 解决这个问题的方法有几种。首先,你可以尝试给相关的可执行文件赋予读写权限。可以使用以下命令来为一个文件或一组文件赋予读写权限: ``` chmod 777 文件名.sh ``` 其中,777是最高权限,表示所有用户都有读、写和执行的权限。 另一种解决方法是使用`chmod u+x`命令,该命令可以为当前用户赋予可执行权限。你可以使用以下命令来赋予一个文件可执行权限: ``` chmod u+x 文件名.sh ``` 如果你是在root目录下执行某个操作时遇到权限不够的问题,你可以尝试切换到root用户,或者使用sudo命令来获取root权限。例如,在安装pentbox过程中遇到"zsh: 权限不够 ./pentbox.rb"的错误提示,你可以尝试使用以下命令来获取root权限并执行该文件: ``` sudo ./pentbox.rb ``` 如果在以root权限执行操作时仍然遇到权限不够的问题,可能是由于其他限制导致的。你可以参考一些博客或论坛上的解决方案,如[CSDN博客](https://blog.csdn.net/whitexie/article/details/82914012)中提到的方法。 总之,当遇到"zsh: 权限不够"的错误提示时,你可以尝试给相关文件赋予适当的权限,或者使用sudo命令获取root权限解决问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Mac/Linux平台命令行的大部分问题解决办法....php(oracle)的安装设置环境变量,zsh:权限不够解决办法](https://blog.csdn.net/qq_37092496/article/details/123393559)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [linux下执行./pentbox.rb提示zsh: 权限不够](https://blog.csdn.net/S90654782/article/details/124673462)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值