Skip to content
Snippets Groups Projects
Commit 4088fbd4 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[BUGFIX] Completely switch to vagrant as user/group for Apache and PHP

parent f2b23c87
No related branches found
No related tags found
No related merge requests found
...@@ -312,13 +312,19 @@ execute "mkdir -p #{node['typo3_site']['webroot']}/#{base_hostname}/" ...@@ -312,13 +312,19 @@ execute "mkdir -p #{node['typo3_site']['webroot']}/#{base_hostname}/"
execute "chown vagrant:vagrant #{node['typo3_site']['webroot']}/#{base_hostname}/" execute "chown vagrant:vagrant #{node['typo3_site']['webroot']}/#{base_hostname}/"
execute "a2ensite #{base_hostname}.conf" execute "a2ensite #{base_hostname}.conf"
# The apache must be running as vagrant main group in order for a proper permission handling # Switch to vagrant as Apache main user
replace_or_add 'Change the apache group to the users main group' do replace_or_add 'Change the apache group to the users main group' do
path '/etc/apache2/envvars' path '/etc/apache2/envvars'
pattern 'export APACHE_RUN_GROUP=.*' pattern 'export APACHE_RUN_GROUP=.*'
line "export APACHE_RUN_GROUP=vagrant" line "export APACHE_RUN_GROUP=vagrant"
end end
replace_or_add 'Change the apache group to the users main group' do
path '/etc/apache2/envvars'
pattern 'export APACHE_RUN_USER=.*'
line "export APACHE_RUN_USER=vagrant"
end
service 'apache2' do service 'apache2' do
action :restart action :restart
end end
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
; Unix user/group of processes ; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group ; Note: The user is mandatory. If the group is not set, the default user's group
; will be used. ; will be used.
user = www-data user = vagrant
group = www-data group = vagrant
; The address on which to accept FastCGI requests. ; The address on which to accept FastCGI requests.
; Valid syntaxes are: ; Valid syntaxes are:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment