LoginSignup
3
3

More than 5 years have passed since last update.

Windows+otto で「A required privilege is not held by the client.」と叱られたら

Last updated at Posted at 2015-09-30

HashiCorp 社の otto のお話。

ローカルファイルを依存に指定するとエラーが発生する場合がある。

発生例

環境

  • Windows 10
  • Cygwin
  • otto 0.1.1

ディレクトリ構成

project
├── Appfile [*1]
└── mongodb
    ├── .ottoid
    └── Appfile [*2]

ファイル内容

*1 /project/Appfile

application {
  name = "example"
  type = "ruby"

  dependency { source = "./mongodb" }
}

customization "ruby" {
  ruby_version = "2.0"
}

*2 /project/mongodb/Appfile

application {
    name = "mongodb"
    type = "docker-external"
}

customization "docker" {
    image = "mongo:3.0"
    run_args = "-p 27017:27017"
}

コンパイル結果

$ otto compile
==> Loading Appfile...
==> Fetching all Appfile dependencies...
    Fetching dependency: file://C:/Users/hoge/project/mongodb
    Error compiling Appfile: error downloading module 'file://C:/Users/hoge/project/mongodb': symlink C:\Users\hoge\project\mongodb C:\Users\hoge\project\.otto\appfile\deps\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx: A required privilege is not held by the client.

解決方法

Shift+Ctrl など使って、管理者権限で実行する

または、以下の方法で設定を変更する

How to fix "A required privilege is not held by the client" error

  1. Win+R を押して secpol.msc を実行
    1.png

  2. 「ローカルセキュリティポリシー」から、「ローカルポリシー」を開く
    2.png

  3. 「セキュリティオプション」を開く
    3.png

  4. 「ユーザーアカウント制御: 管理者承認モードですべての管理者を実行する」を開く
    4.png

  5. 「無効」に設定
    5.png

  6. 再起動

これにより、エラーを回避出来た。

※設定変更に関しては自己責任でお願いします。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3