bugrdiff-backup - Bugs: bug #21106, rdiff-backup trying to access...

 
 

bug #21106: rdiff-backup trying to access parent directories in restore_set_root

Submitted by:  None
Submitted on:  Tue 18 Sep 2007 04:30:56 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 23 Dec 2007 03:00:06 AM UTC, comment #1:

Thanks! The fix has been committed to CVS and will be a part of 1.1.15 and subsequent releases.

Andrew Ferguson <owsla>
Project Administrator
Tue 18 Sep 2007 04:30:56 AM UTC, original submission:

Hi,

I want to use rdiff-backup on a web hosting account, but I don't have read access to /home. This causes rdiff-backup to fail when run in (for example) /home/myuser. Someone else has had this bug before: http://osdir.com/ml/sysutils.backup.rdiff-backup.general/2006-04/msg00013.html

I tracked down the problem to restore_set_root in Main.py. It tries to call parent_dir.listdir() even though parent_dir (/home) isn't readable.

Two simple changes fix this bug. Firstly add the following to rpath.py:

def is_readable(self):
return self.conn.os.access(self.path, self.conn.os.R_OK)

Now add a check to is_readable in restore_set_root in Main.py (around line 601):

if (parent_dir.isdir() and
+ parent_dir.is_readable() and
"rdiff-backup-data" in parent_dir.listdir()): break

I can provide a proper diff if you prefer, I'm just feeling lazy.

Alex Chapman

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by owsla (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 23 Dec 2007 03:00:06 AM UTCowslaStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1