Skip to content

Commit

Permalink
Add the vagrant user to the www-data group for xdebug log access
Browse files Browse the repository at this point in the history
When running php (or phpunit) inside the VM rather than the web
interface, an xdebug-remote.log access error would appear in some
scenarios. In these cases, php runs as the vagrant user rather than
the www-data user and does not have access to the log files.

This modifies the vagrant user during provisioning so that one of
its alternate groups is www-data.

See #691, #631.
Fixes #621.
  • Loading branch information
jeremyfelt committed Jul 20, 2015
1 parent ca5adcf commit 9162a56
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions provision/provision.sh
Expand Up @@ -410,6 +410,10 @@ php5enmod mailcatcher

service php5-fpm restart

# Add the vagrant user to the www-data group so that it has better access
# to PHP and Nginx related files.
usermod -a -G www-data vagrant

# If MySQL is installed, go through the various imports and service tasks.
exists_mysql="$(service mysql status)"
if [[ "mysql: unrecognized service" != "${exists_mysql}" ]]; then
Expand Down

0 comments on commit 9162a56

Please sign in to comment.