Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
114
Help us understand the problem. What is going on with this article?
@ayihis@github

macでzshでzsh compinit: insecure directoriesの警告が出る問題

More than 3 years have passed since last update.

macOSをsierraにしてzshを入れ直したらこんな警告がでるようになってしまった

zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]?

「ディレクトリが安全でないから,compauditで確認してね」みたいな感じらしい
実行してみると以下のように

% compaudit
There are insecure directories:
/usr/local/share/zsh/site-functions
/usr/local/share/zsh

なるほど,この2つのディレクトリが安全でないらしい

% cd /usr/local/share/zsh
% ls -la
total 0
drwxrwxr-x    6 ayihis  admin    204  9 21 18:28 ./
drwxrwxr-x   14 ayihis  admin    476  9 22 15:29 ../
drwxr-xr-x  982 ayihis  admin  33388  9 21 18:28 functions/
drwxr-xr-x  110 ayihis  admin   3740  9 21 18:28 help/
drwxr-xr-x    3 ayihis  admin    102  9 21 18:28 scripts/
drwxrwxr-x    6 ayihis  admin    204  9 22 15:29 site-functions/

とりあえず,site-functionの方の権限を変更してみる

% chmod 755 site-functions/     

これでターミナルを開き直してみる

zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]? y
%
% compaudit
There are insecure directories:
/usr/local/share/zsh

お,減ってるね!
ということで,

% chmod 755 /usr/local/share/zsh

これで警告消えました.
めでたしめでたし!たぶん!

参考

zsh のセットアップ
How to fix “zsh compinit: insecure directories”?
[zsh] compinitのセキュリティオプション

114
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ayihis@github
超絶見習い情報系学生. 僕みたいなLinuxと出会ったばっかりのような初心者がつまずく内容を備忘録的な感じで情報共有したいです

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
114
Help us understand the problem. What is going on with this article?