Werk #11868: mkbackup: Fix permission issues when backing up different sites

Component Core & Setup
Title mkbackup: Fix permission issues when backing up different sites
Date Jan 11, 2021
Checkmk Editon Checkmk Raw (CRE)
Checkmk Version 1.6.0p21 2.1.0i1 2.0.0b5
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

The site and appliance backup functionality of Checkmk share a global lock which ensures that only a single backup or restore job is running at a time.

However, on current linux distributions, a permission issue may occur when backing up multiple sites on a single Checkmk server. The problem appears when one site creates the global lock file (/tmp/mkbackup.lock), locks it and releases the lock after the backup. The file is kept after that. Once another site tries to lock the file during it's backup, a "Permission denied" error is raised. This is caused by specific file restrictions in directories where the sticky bit is set.

The lock file has now been moved to /var/lock/mkbackup/mkbackup.lock to solve this issue.

To the list of all Werks