Home >Common Problem >Fix the 'unsafe completion-related directory detected' issue in Oh My Zsh
One option to change the permissions is to use chmod 755, which is full permissions for the owner (you) and provides to others Read and execute permissions for the relevant directory. For example:
chmod 755 /usr/local/share/zsh
##chmod 755 /usr/local/share/zsh/site-functions
ZSH_DISABLE_COMPFIX=true
[oh-my-zsh] Insecure completion dependency directory detected:drwxrwxr-x 3 user admin 96 Jun 29 2020 /usr/local/share/zsh
[oh-my-zsh] For security reasons, we will not load from these directories until
drwxrwxr -x 5 user admin 160 Jul 19 14:54 /usr/local/share /zsh/sitefunction[oh-my-zsh] You fix their permissions and ownership and restart zsh.
[oh-my-zsh] To fix your permissions you can do this by disabling
[oh-my-zsh] See the list above for directories with group or other writability.[oh-my-zsh] write permissions for "group" and "others" and ensuring that
[oh-my-zsh] If the above Doesn't help or you want to skip validation for
The [oh-my-zsh] owner directory is root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh] compaudit | xargs chmod gw,ow[oh-my-zsh] unsafe directories, you can
set the variable ZSH_DISABLE_COMPFIX to [oh-my-zsh] "true" before oh -my- zsh from your zshrc file.
The above is the detailed content of Fix the 'unsafe completion-related directory detected' issue in Oh My Zsh. For more information, please follow other related articles on the PHP Chinese website!