rdiff-backup tries to read/list directories, no matter --exclude rules.

Bug #725083 reported by Randall Wigle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rdiff-backup
Unknown
Unknown
rdiff-backup (Debian)
Fix Released
Unknown
rdiff-backup (Ubuntu)
Won't Fix
Low
Unassigned

Bug Description

Binary package hint: rdiff-backup

 I am using rdiff-backup to backup my system via an ssh connection. I have an unexpected informative error, and I don't know why I am getting it.

==================================
Reading filelist /home/rwigle/bin/rdiff-excl.txt
Sorting filelist /home/rwigle/bin/rdiff-excl.txt
Exception '[Errno 13] Permission denied: '/home/rwigle/.epsilon/server'' raised of class '<type 'exceptions.OSError'>':
File "/usr/lib/pymodules/python2.6/rdiff_backup/robust.py", line 32, in check_common_error
try: return function(*args)
File "/usr/lib/pymodules/python2.6/rdiff_backup/rpath.py", line 998, in listdir
return self.conn.os.listdir(self.path)

ListError .epsilon/server [Errno 13] Permission denied: '/home/rwigle/.epsilon/server'
=============================================

The thing is that I have set --exclude-special-files AND I have excluded the folder /home/rwigle/.epsilon (in which the troublesome server folder resides) but I still get this error.

The protection on .epsilon/server is as follows

drwx------ 2 root root 4.0K 2010-11-10 14:54 server

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: rdiff-backup 1.2.8-5ubuntu2
ProcVersionSignature: Ubuntu 2.6.32-28.55-generic 2.6.32.27+drm33.12
Uname: Linux 2.6.32-28-generic x86_64
Architecture: amd64
Date: Fri Feb 25 11:21:46 2011
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_CA.utf8
 SHELL=/bin/bash
SourcePackage: rdiff-backup

Revision history for this message
Randall Wigle (rwigle) wrote :
Revision history for this message
Andreas Olsson (andol) wrote :

I can confirm this error. I assume your backup is being run as a non-root user?

It would appear as if rdiff-backup is trying to read/list directories before applying the --exclude rules.

andreas@stilgar:~/temp$ mkdir -p from/alpha/beta/gamma
andreas@stilgar:~/temp$ sudo chown root:root from/alpha/beta/gamma/
andreas@stilgar:~/temp$ sudo chmod 700 from/alpha/beta/gamma/
andreas@stilgar:~/temp$ mkdir to
andreas@stilgar:~/temp$ rdiff-backup --exclude '**/alpha' from/ to/
ListError alpha/beta/gamma [Errno 13] Permission denied: 'from/alpha/beta/gamma'
andreas@stilgar:~/temp$ rm -rf to/*
andreas@stilgar:~/temp$ strace rdiff-backup --exclude '**/alpha' from/ to/ 2>&1 | grep gamma
lstat("from/alpha/beta/gamma", {st_mode=S_IFDIR|0700, st_size=40, ...}) = 0
open("from/alpha/beta/gamma", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 EACCES (Permission denied)
write(2, "ListError alpha/beta/gamma [Errn"..., 81ListError alpha/beta/gamma [Errno 13] Permission denied: 'from/alpha/beta/gamma'
andreas@stilgar:~/temp$

The test above was performed with the currenty natty version rdiff-backup 1.2.8-5ubuntu3.

This seems to be from the same root cause as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508063

Changed in rdiff-backup (Ubuntu):
status: New → Triaged
importance: Undecided → Low
summary: - Unexpected error report
+ rdiff-backup tries to read/list directories, no matter --exclude rules.
Revision history for this message
Andreas Olsson (andol) wrote :

I have also made an upstream bug report of this

http://savannah.nongnu.org/bugs/index.php?32597

(Do note that the rdiff-backup upstream is currently not very active.)

Revision history for this message
Randall Wigle (rwigle) wrote : Re: [Bug 725083] Re: Unexpected error report

Yes, this is being run as non-root. (And thanks...)

On Fri, Feb 25, 2011 at 1:17 PM, Andreas Olsson <email address hidden> wrote:

> I can confirm this error. I assume your backup is being run as a non-
> root user?
>
> It would appear as if rdiff-backup is trying to read/list directories
> before applying the --exclude rules.
>
> andreas@stilgar:~/temp$ mkdir -p from/alpha/beta/gamma
> andreas@stilgar:~/temp$ sudo chown root:root from/alpha/beta/gamma/
> andreas@stilgar:~/temp$ sudo chmod 700 from/alpha/beta/gamma/
> andreas@stilgar:~/temp$ mkdir to
> andreas@stilgar:~/temp$ rdiff-backup --exclude '**/alpha' from/ to/
> ListError alpha/beta/gamma [Errno 13] Permission denied:
> 'from/alpha/beta/gamma'
> andreas@stilgar:~/temp$ rm -rf to/*
> andreas@stilgar:~/temp$ strace rdiff-backup --exclude '**/alpha' from/ to/
> 2>&1 | grep gamma
> lstat("from/alpha/beta/gamma", {st_mode=S_IFDIR|0700, st_size=40, ...}) = 0
> open("from/alpha/beta/gamma", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) =
> -1 EACCES (Permission denied)
> write(2, "ListError alpha/beta/gamma [Errn"..., 81ListError
> alpha/beta/gamma [Errno 13] Permission denied: 'from/alpha/beta/gamma'
> andreas@stilgar:~/temp$
>
>

Changed in rdiff-backup (Debian):
status: Unknown → Confirmed
Revision history for this message
Otto Kekäläinen (otto) wrote :

Hello!

The new rdiff-backup 2.0 (written in Python 3) has recently been released. Please check out https://github.com/rdiff-backup/rdiff-backup and contribute in this open source project.

This bug is unlikely to apply to anymore to latest rdiff-backup 2.0, so it will be closed unless you want to help out and test if you can repeat the bug with the latest rdiff-backup.

Changed in rdiff-backup (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Otto Kekäläinen (otto) wrote :

Closing issue as wontfix since there was not further contributions from reporter.

Changed in rdiff-backup (Ubuntu):
status: Incomplete → Won't Fix
Changed in rdiff-backup (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.