[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] problem with chmod 0 directories
From: |
The Anarcat |
Subject: |
Re: [rdiff-backup-users] problem with chmod 0 directories |
Date: |
Mon, 15 May 2006 14:16:25 -0400 |
User-agent: |
Thunderbird 1.5.0.2 (X11/20060501) |
dean gaudet wrote:
> On Mon, 15 May 2006, The Anarcat wrote:
>
>> Hello,
>>
>> I have a problem running rdiff-backup over a directory which has a mode
>> of 0. The source directory is read as root so that poses no problem, but
>> the target directory is written as a regular user, so I get a:
>>
>> File "/usr/lib/python2.3/site-packages/rdiff_backup/Main.py", line
>> 334, in Backup
>> backup.Mirror_and_increment(rpin, rpout, incdir)
>> File "/usr/lib/python2.3/site-packages/rdiff_backup/backup.py", line
>> 51, in Mirror_and_increment
>> DestS.patch_and_increment(dest_rpath, source_diffiter, inc_rpath)
>> File "/usr/lib/python2.3/site-packages/rdiff_backup/connection.py",
>> line 448, in __call__
>> return apply(self.connection.reval, (self.name,) + args)
>> File "/usr/lib/python2.3/site-packages/rdiff_backup/connection.py",
>> line 370, in reval
>> if isinstance(result, Exception): raise result
>> OSError: [Errno 13] Permission denied: '/backup/target/foo'
>> Fatal Error: Lost connection to the remote system
>>
>> Indeed, the directory foo is chmod 0, both on source and target. Of
>> course, it can't write on target, so the backup fails.
>>
>> This is a real problem here because we sometimes use chmod -R 0
>> <directory> to disable sections of the system as root.
>>
>> Any ideas on how to deal with this?
>
> istr this is an old bug... what version are you using? i don't have
> this problem on 1.0.4 ... maybe you can give a sequence of commands
> to reproduce it.
>
> % mkdir src
> % touch src/a
> % mkdir src/b
> % touch src/b/c
> % rdiff-backup src dst
> % echo hi >src/b/c
> % chmod 0 src/b
> % rdiff-backup src dst
> ListError b [Errno 13] Permission denied: 'src/b'
> % ls -l dst
> total 4
> -rw-r--r-- 1 dean dean 0 May 15 08:53 a
> d--------- 2 dean dean 6 May 15 08:53 b
> drwx------ 3 dean dean 4096 May 15 08:53 rdiff-backup-data
> % rdiff-backup src dst
> ListError b [Errno 13] Permission denied: 'src/b'
> % rdiff-backup --version
> rdiff-backup 1.0.4
I have the same thing here:
$ mkdir src
$ touch src/a
$ mkdir src/b
$ touch src/b/c
$ rdiff-backup src dst
$ echo hi > src/b/c
$ chmod 0 src/b
$ rdiff-backup src dst
ListError b [Errno 13] Permission denied: 'src/b'
$ ls -l dst
total 4
-rw-r--r-- 1 backup backup 0 May 15 14:07 a
d--------- 2 backup backup 512 May 15 14:07 b
drwx------ 3 backup backup 1024 May 15 14:07 rdiff-backup-data
$ rdiff-backup src dst
ListError b [Errno 13] Permission denied: 'src/b'
$ rdiff-backup --version
rdiff-backup 1.1.5
Although my problem is a bit different, since it's not a problem with
reading the source, but writing the target. What I don't understand, is
that I cannot reproduce the bug at this point:
lethe# mkdir src
lethe# touch src/a
lethe# mkdir src/b
lethe# touch src/b/c
lethe# rdiff-backup src address@hidden::dst
Password:
lethe# chmod 0 src/b/
lethe# rdiff-backup src address@hidden::dst
Password:
lethe# ls -l /backup/dst/
total 4
-rw-r--r-- 1 backup backup 0 May 15 14:10 a
d--------- 2 backup backup 512 May 15 14:10 b
drwx------ 3 backup backup 1536 May 15 14:11 rdiff-backup-data
lethe# rm -rf /backup/dst/
lethe# rdiff-backup src address@hidden::dst
Password:
lethe# ls -al /backup/dst/
total 8
drwxr-xr-x 4 backup backup 512 May 15 14:10 .
drwxr-xr-x 12 backup backup 512 May 15 14:12 ..
-rw-r--r-- 1 backup backup 0 May 15 14:10 a
d--------- 2 backup backup 512 May 15 14:10 b
drwx------ 3 backup backup 512 May 15 14:12 rdiff-backup-data
lethe# echo foo > src/b/d
lethe# rdiff-backup src address@hidden::dst
Password:
lethe# ls -al /backup/dst/
total 8
drwxr-xr-x 4 backup backup 512 May 15 14:10 .
drwxr-xr-x 12 backup backup 512 May 15 14:12 ..
-rw-r--r-- 1 backup backup 0 May 15 14:10 a
d--------- 2 backup backup 512 May 15 14:12 b
drwx------ 3 backup backup 1024 May 15 14:12 rdiff-backup-data
lethe# ls -al /backup/dst/b/
total 6
d--------- 2 backup backup 512 May 15 14:12 .
drwxr-xr-x 4 backup backup 512 May 15 14:10 ..
-rw-r--r-- 1 backup backup 0 May 15 14:10 c
-rw-r--r-- 1 backup backup 4 May 15 14:12 d
I don't understand.. The backups still fail, but I cannot isolate...
A.
signature.asc
Description: OpenPGP digital signature
- [rdiff-backup-users] problem with chmod 0 directories, The Anarcat, 2006/05/15
- Re: [rdiff-backup-users] problem with chmod 0 directories, dean gaudet, 2006/05/15
- Re: [rdiff-backup-users] problem with chmod 0 directories,
The Anarcat <=
- Re: [rdiff-backup-users] problem with chmod 0 directories, dean gaudet, 2006/05/15
- Re: [rdiff-backup-users] problem with chmod 0 directories, The Anarcat, 2006/05/15
- [rdiff-backup-users] UPDATE: problem with chmod 0 directories, The Anarcat, 2006/05/16
- Re: [rdiff-backup-users] UPDATE: problem with chmod 0 directories, rdiff, 2006/05/16
- Re: [rdiff-backup-users] UPDATE: problem with chmod 0 directories, The Anarcat, 2006/05/16