[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[rdiff-backup-users] Bug (and Fix) with NFS and --exclude-if-present
From: |
Jakob Krainz |
Subject: |
[rdiff-backup-users] Bug (and Fix) with NFS and --exclude-if-present |
Date: |
Wed, 27 Oct 2010 18:50:02 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Hello Guys.
I recently stumbled upon an error with NFS and --exclude-if-present.
If the NFS-export contains a directory "lost+found", which is owned by
root and has access rights rwx------ (0700) on the nfs-server, then no
process on the client can access that directory (by default, as root
is mapped to nobody).
The selection function (Select.presence_get_sf in selection.py) that
tests for the presence of a file however uses rp.readable() - which
returns true, as the backup-process is root, and the directory is
readable by root, according to its own metadata.
The following lstat-call then throws an OSError-Exception (permission
denied)...
Below is a patch that should solve this problem. I would love to see
this fix (or something comparable) included in the next stable
rdiff-backup-version.
If you have any more questions, please ask.
Greetings,
Jakob Krainz
diff -r eb3cfb65bcb5 selection.py
--- a/selection.py Wed Oct 27 17:21:01 2010 +0200
+++ b/selection.py Wed Oct 27 17:23:19 2010 +0200
@@ -478,9 +478,12 @@
assert include == 0 or include == 1
def sel_func(rp):
- if rp.isdir() and rp.readable() and \
- rp.append(presence_filename).lstat():
- return include
+ try:
+ if rp.isdir() and rp.readable() and \
+ rp.append(presence_filename).lstat():
+ return include
+ except OSError:
+ return None
return None
sel_func.exclude = not include
- [rdiff-backup-users] Bug (and Fix) with NFS and --exclude-if-present,
Jakob Krainz <=