-
-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't restart apache, due to /var/lock/apache2 ACL issue #310
Comments
This doesn't happen when just running the apache2 cookbook. Can you post the full output of your chef run? Likely the nagios3 cookbook is doing something that apache2 does not expect. |
https://github.com/viverae-cookbooks/apache2/blob/master/recipes/default.rb#L115-L125 If I comment off Line 118 about lock_dir, I won't have the issue. This looks like to be the root cause. |
I'm getting the same error, now don't laugh at the sprunge url that really did come back: |
update to default.rb as per @dennyzhang suggestion https://github.com/viverae-cookbooks/apache2/issues/310
Huh, I take it back. This must be something that has changed recently. I'm going to check if this also happens with apache2.4 |
Looks like this only happens with apache2.2 |
This got set because of #296. Related Directives: |
after reading through #296 I'm a bit confused as this was working just fine a few months ago? Just to check I threw this in my default attributes:
No, good. For now, I'm just implementing @dennyzhang 's suggestion, but that does not seem like the long term solution. |
@joshuacox I'm wondering why we set the ownership as "root", instead of "www-data"? |
@dennyzhang agreed on this being a blocker, I've got a temporary fork up, that merely deletes the line 118 you mentioned here: https://github.com/joshuacox/apache2 and I'll work on a more permanent solution and post a pull request as soon as I find it. |
ok, here on debian jessie, if I install apache2 from repos I have:
is there any consensus on best practice here? reading the link it does specifically note that you want to limit access to this lock directory, but it does not state that you should limit it to root only. As you can see I've got a possible fix at joshuacox@a2e20dc but I'm thinking of removing the group line entirely to match what I got above from the repos. Any thoughts? |
Fixed with #312 |
We can check back in on this if we find that other platforms require the same fix. |
Verified. It works now. Thanks guys. |
…bian/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.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi there
Below is the error message of running chef update.
I've checked the code, /var/lock/apache2 is changed to root on purpose.
Do you know what's the problem? My OS is Ubuntu 12.04.
---- Begin output of /etc/init.d/apache2 start ----
STDOUT: * Starting web server apache2
/var/lock/apache2 already exists but is not a directory owned by www-data.
Please fix manually. Aborting.
...fail!
STDERR:
---- End output of /etc/init.d/apache2 start ----
Ran /etc/init.d/apache2 start returned 1
The text was updated successfully, but these errors were encountered: