Branch: refs/heads/2.1.0
Home:
https://github.com/Checkmk/checkmk
Commit: c025ee83fb7fd0cc7459507759a7a0b888cf2ad4
https://github.com/Checkmk/checkmk/commit/c025ee83fb7fd0cc7459507759a7a0b88…
Author: Maximilian Wirtz <maximilian.wirtz(a)checkmk.com>
Date: 2024-02-02 (Fri, 02 Feb 2024)
Changed paths:
A .werks/16332
M omd/packages/omd/omdlib/main.py
Log Message:
-----------
16332 FIX for 'ERROR: Failed to read config of site' of existing site when
creating a new one
When creating a new site while having other sites the new site tries to determine the used
ports of the other sites with checking their 'etc/omd/site.conf'. If this file is
not accessible an error 'ERROR: Failed to read config of site ...' is shown.
This happens e.g. if a root user with a restictive umask (e.g. 0077) creates a site. The
site folder has then only owner and group permissions set while "other" does not
have any permissions. After this site folder and the site user is created omd switches to
that user and creates the file and folder structure with defined permissions. So that
'etc/omd/site.conf' is other-readable.
Since the site folder is missing the executable permission for other this folder is not
traversable therefore the files and folders beneath are inaccessible.
With this change we make sure that the site folder has at least the executable permission
for other.
For already existing sites this change has no affect. If the error 'ERROR: Failed to
read config of site ...' is still shown make sure that existing site folders have that
other executable permission, e.g. by 'chmod o+x /omd/sites/<SITENAME>'.
SUP-16556
Change-Id: Ibbf39be611f86203f0c26dfc69e7e3af08078883