Here is the error:
Failed to start the job: Traceback (most recent call last): File "/omd/sites/home/bin/mkbackup", line 2024, in <module> main() File "/omd/sites/home/bin/mkbackup", line 2019, in main mode.runner(mode_args, opt_dict) File "/omd/sites/home/bin/mkbackup", line 553, in <lambda> runner=lambda args, opts: mode_backup(args[0], opts=opts), File "/omd/sites/home/bin/mkbackup", line 617, in mode_backup acquire_backup_lock() File "/omd/sites/home/bin/mkbackup", line 202, in acquire_backup_lock makedirs(str(lock_file_path.parent), group="omd", mode=0o770) File "/omd/sites/home/bin/mkbackup", line 284, in makedirs makedir(path, user, group, mode) File "/omd/sites/home/bin/mkbackup", line 294, in makedir os.mkdir(path) PermissionError: [Errno 13] Permission denied: '/var/lock/mkbackup'
Here are the (default) permissions on CentOS 7:
[root@vm-checkmk ~]# ls -la /var/lock/
total 0
drwxr-xr-x. 5 root root 100 Apr 19 12:40 .
drwxr-xr-x. 29 root root 1000 Apr 19 12:40 ..
drwxrwxr-x. 2 root lock 40 Apr 19 12:40 lockdev
drwx------. 2 root root 40 Apr 19 12:42 lvm
drwxr-xr-x. 2 root root 80 Apr 19 12:40 subsys
If I create the subfolder mkbackup with omd as the group owner, the backup runs successfully but that folder is eventually flushed and the problem comes back. I could obviously chance /var/lock’s permissions but I don’t think that’s a suitable solution. What’s wrong here?
Same error on 2.0.0, 2.0.0p1, p2 and p3.