Skip to content

Instantly share code, notes, and snippets.

@akagane99
Last active December 7, 2015 20:34
Show Gist options
  • Save akagane99/2c8043dc978683409a37 to your computer and use it in GitHub Desktop.
Save akagane99/2c8043dc978683409a37 to your computer and use it in GitHub Desktop.
NetCommons3 vagrant ファイルオーナー変更 www-data→vagrant

Vagrantfile設定変更

C:\projects\NetCommons3\Vagrantfile (53,1): 
    :create => true, :owner=> 'www-data', :group => 'www-data'
↓
    :create => true, :owner=> 'vagrant', :group => 'vagrant'

apache設定変更

# vim /etc/apache2/apache2.conf
User www-data
Group www-data
↓
#User www-data
#Group www-data
User vagrant
Group vagrant

設定確認

# apache2ctl configtest
Syntax OK

再起動

# service apache2 restart

samba設定変更

# vim /etc/samba/smb.conf

#force user = root
#force group = root
force user = vagrant
force group = vagrant

再起動

# service smbd restart

vagrantにオーナーを変更

# cd /var/www/
# chown -R vagrant:vagrant /var/www/app
# chown -R vagrant:vagrant /var/www/docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment