3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

VagrantでWebサービス実行中にpermission deniedが発生する場合

Last updated at Posted at 2015-02-18

Vagrantを用いて/vagrant等の共有ディレクトリ上でWebサービス開発する際、
Windowsなら上記ディレクトリは完全無防備になるので良いのですが。(良いのか?w)
OS Xの場合、VM側のデーモンがファイルを生成したりする際に、
permission deniedが発生することがあります。

対処法としては、Vagrantfile内の設定をいじって、
VMから見た共有ディレクトリのオーナー/グループをデーモンのそれに変更します。
※apacheの場合

Vagrantfile
### デフォルトだと40行目あたり
config.vm.synced_folder ".", "/vagrant", :owner => "apache", :group => "apache"
###

もちろん、デーモンがnginxの場合は、上記"apache"が"nginx"になりますね。

3
4
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
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?