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 > 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 mailing list at rdiff-backup-users@nongnu.org > http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users > 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. Cheers Gavin -- www.gnumims.org <http://www.gnumims.org> www.kromhouts.net <http://www.kromhouts.net> Everything in moderation, including moderation itself.
_______________________________________________ rdiff-backup-users mailing list at rdiff-backup-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki