Skip to content
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

Ensure the cache directory exists #5392

Merged
merged 1 commit into from Aug 9, 2017
Merged

Conversation

ekohl
Copy link
Contributor

@ekohl ekohl commented Jul 1, 2017

As suggested in #4414

Fixes GH-4414

@Crunsher Crunsher added the area/setup Installation, systemd, sample files label Jul 13, 2017
@dnsmichi dnsmichi added this to the 2.8.0 milestone Aug 9, 2017
@dnsmichi dnsmichi self-requested a review August 9, 2017 16:21
@dnsmichi dnsmichi added the bug Something isn't working label Aug 9, 2017
@dnsmichi
Copy link
Contributor

dnsmichi commented Aug 9, 2017

Looks good to me. I'd like to test that a little further before merging this into a bugfix release.

@dnsmichi
Copy link
Contributor

dnsmichi commented Aug 9, 2017

Thanks 👍

@dnsmichi dnsmichi merged commit e188686 into Icinga:master Aug 9, 2017
@ekohl ekohl deleted the cache-dir branch August 9, 2017 16:26
@dnsmichi dnsmichi modified the milestones: 2.7.1, 2.8.0 Sep 5, 2017
dnsmichi pushed a commit that referenced this pull request Sep 5, 2017
@dnsmichi dnsmichi added the backported Fix was included in a bugfix release label Sep 5, 2017
@oliver
Copy link

oliver commented Sep 23, 2017

Is it necessary to use mode 750 for the cache directory, or would mode 755 be acceptable as well for you?

After upgrading to Icinga 2.7.1 my /var/cache/icinga2/ directory is readable only for nagios user and nagios group; but icinga2-classicui runs as user www-data so it cannot access the /var/cache/icinga2/objects.cache file and shows "Error: Could not read object configuration data" in browser. Changing the directory mode to 755 fixed this.

I'm not sure if the .deb packages had originally created /var/cache/icinga2/ with mode 755 or if I manually made that change during initial setup and forgot to document it. But if there's no harm done by setting the directory mode to 755 it would be nice if you could change that for future releases. Also, if you have alternative suggestions how to set this up (icinga2-classicui running as www-data but /var/cache/icinga2/ only accessible for nagios user/group) I'd appreciate that.

This happened with icinga2 2.7.1-1.jessie as installed from https://packages.icinga.com/debian/.

@lazyfrosch
Copy link
Contributor

@oliver the packaging sets this per default:

https://github.com/Icinga/icinga-packaging/blob/deb/release/icinga2/jessie/debian/icinga2-common.postinst#L54

Unfortunatly prepare-dirs does not the same here...

@ekohl
Copy link
Contributor Author

ekohl commented Sep 25, 2017

@lazyfrosch looks like a tmpfiles.d solution for systemd-based systems is still the cleaner route to take.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/setup Installation, systemd, sample files backported Fix was included in a bugfix release bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants