Werk #14289: Fix PermissionError during 'omd update' related to '/omd/apache' files

Component Site management
Title Fix PermissionError during 'omd update' related to '/omd/apache' files
Date Jul 25, 2022
Checkmk Editon Checkmk Raw (CRE)
Checkmk Version 2.2.0i1 2.1.0p9
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

When performing 'omd update' to 2.1.0p7 or newer, a PermissionError could occur, depending on the umask settings of your system. A traceback like this was visible in this situation:

Traceback (most recent call last):
File "/omd/versions/2.1.0p8.cee/bin/omd", line 63, in <module>
omdlib.main.main()
File "/omd/versions/2.1.0p8.cee/lib/python3/omdlib/main.py", line 4665, in main
command.handler(version_info, site, global_opts, args, command_options)
File "/omd/versions/2.1.0p8.cee/lib/python3/omdlib/main.py", line 2726, in main_update
not is_apache_hook_up_to_date(site)
File "/omd/versions/2.1.0p8.cee/lib/python3/omdlib/system_apache.py", line 72, in is_apache_hook_up_to_date
with open(os.path.join(omdlib.utils.omd_base_path(), "omd/apache/%s.conf" % site.name)) as f:
PermissionError: [Errno 13] Permission denied: '/omd/apache/checkmk_test.conf'

The issue is fixed with this relase. However, you can workaround this issue by executing chmod o+r /omd/apache/*.conf as root before executing 'omd update'.

To the list of all Werks