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

 
 

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

Submitter:  None
Submitted:  Tue 18 Sep 2007 04:30:56 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-12-23 owsla StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code