LoginSignup
5
6

More than 5 years have passed since last update.

Vagrant 共有ディレクトリ 権限 変更方法

Last updated at Posted at 2016-03-31

Vagrant 共有ディレクトリ 権限 変更方法

少々検索することになったので備忘録。

1、Vagrant の共有ディレクトリはchownやchgrpでは変更が出来ないようになっている。

2、変更するにはVagrantfileを編集する必要がある。

3、設定の書き方はバージョンによって多少異なるため、変更方法は公式リファレンスを参照するほうが手っ取り早い。

今回はVagrant 1.8.1における共有ディレクトリの権限変更を行った。

公式リファレンス

によると、(以下スクリーンショット)

modify own grp.jpg

となっているため、実際に

Vagrantfile
config.vm.synced_folder "./", "/vagrant",
 owner: "root", group: "root"

と書いて保存、vagrant reloadする。(共有ディレクトリの場所は変えたくなかったのでそのままにしてある。)

権限の確認(以下スクリーンショット)

Screen Shot 2016-03-31 at 10.51.56 AM.png

権限がvagrant->rootに変わったことが確認できた。

以上。

5
6
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
5
6