Module: check_mk
Branch: master
Commit: 6da9e09cb017c91774fbf8ca6896ead409c6f443
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6da9e09cb017c9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 8 09:54:09 2017 +0100
4329 FIX mkbackup: Fixed "Operation not permitted" error when backing up to some
NFS shares
Change-Id: I08dc61bbf96f531762b37d28f6d354cdf2237110
---
.werks/4329 | 9 +++++++++
ChangeLog | 1 +
bin/mkbackup | 8 ++++++++
3 files changed, 18 insertions(+)
diff --git a/.werks/4329 b/.werks/4329
new file mode 100644
index 0000000..116e48b
--- /dev/null
+++ b/.werks/4329
@@ -0,0 +1,9 @@
+Title: mkbackup: Fixed "Operation not permitted" error when backing up to some
NFS shares
+Level: 1
+Component: core
+Compatible: compat
+Version: 1.4.0i4
+Date: 1486544016
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 94b3736..41aae63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* 4286 SNMP MIBs of the Event Console can now be packed using MKPs...
* 4269 FIX: Verifying unexpected keys in check_info while loading checks...
* 4281 FIX: Fixed piggyback hosts with spaces in names leading to crashes...
+ * 4329 FIX: mkbackup: Fixed "Operation not permitted" error when backing up
to some NFS shares
Checks & Agents:
* 4104 veeam_tapejobs: New check to monitor Veeam tape jobs
diff --git a/bin/mkbackup b/bin/mkbackup
index 421a7cb..8ce264b 100755
--- a/bin/mkbackup
+++ b/bin/mkbackup
@@ -201,6 +201,10 @@ def set_permissions(path, uid, gid, mode):
if e.errno == 13:
pass # On CIFS mounts where "uid=0,forceuid,gid=1000,forcegid"
mount options
# are set, this is not possible. So skip over.
+ elif e.errno == 1:
+ pass # On NFS mounts where "" mount options are set, we get an
+ # "Operation not permitted" error when trying to change e.g.
+ # the group permission.
else:
raise
@@ -210,6 +214,10 @@ def set_permissions(path, uid, gid, mode):
if e.errno == 13:
pass # On CIFS mounts where "uid=0,forceuid,gid=1000,forcegid"
mount options
# are set, this is not possible. So skip over.
+ elif e.errno == 1:
+ pass # On NFS mounts where "" mount options are set, we get an
+ # "Operation not permitted" error when trying to change e.g.
+ # the group permission.
else:
raise