diff options
-rw-r--r-- | rdiff-backup/CHANGELOG | 4 | ||||
-rw-r--r-- | rdiff-backup/rdiff_backup/backup.py | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index baf131b..f37d28d 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,6 +1,10 @@ New in v1.1.16 (????/??/??) --------------------------- +Don't give up right away if we can't open a file. Try chmod'ing it even +if we aren't root or don't own it, since that can sometimes work on AFS +and NFS. Closes Savannah bug #21202. (Andrew Ferguson) + Correctly handle updates to nested directories with unreadable permissions. Thanks to John Goerzen for the bug report. Closes Debian bugs #389134 and #411849. (Andrew Ferguson) diff --git a/rdiff-backup/rdiff_backup/backup.py b/rdiff-backup/rdiff_backup/backup.py index e0c5eec..2f5c9e4 100644 --- a/rdiff-backup/rdiff_backup/backup.py +++ b/rdiff-backup/rdiff_backup/backup.py @@ -212,7 +212,14 @@ class DestinationStruct: return Rdiff.get_signature(dest_rp) except IOError, e: if (e.errno == errno.EPERM): - log.Log.FatalError("Could not open %s for reading. Check " + try: + # Try chmod'ing anyway -- This can work on NFS and AFS + # depending on the setup. We keep the if() statement + # above for performance reasons. + dest_rp.chmod(0400 | dest_rp.getperms()) + return Rdiff.get_signature(dest_rp) + except (IOError, OSError): + log.Log.FatalError("Could not open %s for reading. Check " "permissions on file." % (dest_rp.path,)) else: raise |