Skip to content

Commit af01abe

Browse files
committed
Ensure the lock_dir is owned by www-data for Apache 2.2 and 2.4 on Debian/Ubuntu
The default `apache2ctl` script for both Apache 2.2 and 2.4 creates the lock_dir in `/var/lock/apache2`. If the directory exists but is not owned by `www-data`, the script fails, similar to what is described in sous-chefs#310 and sous-chefs#312. This commit enhances the fix from sous-chefs#312 for Apache 2.4 in Debian/Ubuntu.
1 parent ceb3df9 commit af01abe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

recipes/default.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127

128128
directory node['apache']['lock_dir'] do
129129
mode '0755'
130-
if node['platform_family'] == 'debian' && node['apache']['version'] == '2.2'
130+
if node['platform_family'] == 'debian' && %(2.2 2.4).include?(node['apache']['version'])
131131
owner node['apache']['user']
132132
else
133133
owner 'root'

0 commit comments

Comments
 (0)