Werk #11868: mkbackup: Fix permission issues when backing up different sites
Komponente | Core & setup |
Titel | mkbackup: Fix permission issues when backing up different sites |
Datum | 11.01.2021 |
Checkmk Edition | Checkmk Raw (CRE) |
Checkmk-Version | 1.6.0p21 2.0.0b5 2.1.0b1 |
Level | Kleine Änderung |
Klasse | Bugfix |
Kompatibilität | Kompatibel - benötigt kein manuelles Eingreifen |
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.