[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] Bug (and Fix) with NFS and --exclude-if-present

From: Gavin
Subject: Re: [rdiff-backup-users] Bug (and Fix) with NFS and --exclude-if-present
Date: Sat, 30 Oct 2010 15:47:45 +1000
User-agent: Mozilla-Thunderbird (X11/20100329)

Jakob Krainz wrote:
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

Below is a patch that should solve this problem. I would love to see
this fix (or something comparable) included in the next stable

If you have any more questions, please ask.

        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 mailing list at address@hidden
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Hi Jakob,

I don't think there is much active development going on (I'm not a dev here just a user).
Rdiff-backup is pretty stable and works well in a large set of conditions.
But having the patch out there might help someone so thanks for posting it.

Everything in moderation, including moderation itself.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]