Werk #17556: omd update: Don't change permission of home directory after aborted update
| Component | Site management | ||||||
| Title | omd update: Don't change permission of home directory after aborted update | ||||||
| Date | Jan 20, 2025 | ||||||
| Level | Trivial Change | ||||||
| Class | Bug Fix | ||||||
| Compatibility | Compatible - no manual interaction needed | ||||||
| Checkmk versions & editions |
|
In #Werk 16408, it was made possible to safely abort the update if a conflict occurs.
After an update was aborted, omd would set the permissions of the home directory /omd/sites/{site_name} to rwxr-x---.
This is an issue, since omd create sets the permissions of this directory to rwxr-x--x.
Moreover, after an update is aborted the permissions should be exactly the same as before the attempt failed.
There is a specific reason for this set of permissions. If the home directory of a site cannot be read, then another site will display the error:
ERROR: Failed to read config /omd/sites/{site_name}/etc/omd/site.conf of site {site_name}. APACHE_TCP_PORT port will possibly be allocated twice
This error is displayed, whenever a port is allocated using omd config set.
In case you see this error message, ensure that your site has the correct permissions.
The permissions should look like this:
# ls -lh /omd/sites/stable
drwxr-x--x 10 stable stable 4.0K Jan 20 17:36 /omd/sites/stable
# ls -ldh /omd/sites/stable/etc/
drwxr-x--x 21 stable stable 4.0K Jan 20 17:37 /omd/sites/stable/etc/
# ls -ldh /omd/sites/stable/etc/omd/
drwxr-x--x 2 stable stable 4.0K Jan 20 17:36 /omd/sites/stable/etc/omd/
# ls -lh /omd/sites/stable/etc/omd/site.conf
-rw-r--r-- 1 stable stable 601 Jan 20 17:36 /omd/sites/stable/etc/omd/site.conf
With this Werk, omd correctly restore of the home directory to what they were before the update.