I'm trying to execute the following command in my Python script:

rdiff-backup --terminal-verbosity=5 --remote-schema "ssh %s -p1019 -i C:/Users/Adam/.ssh/private-passphrase rdiff-backup --server" C:/Users/Adam/Desktop pi@

My source directory is from a Windows OS and my target directory is a Debian based system.


I get this output:

`Using rdiff-backup version 1.2.8
Executing ssh pi@ -p1019 -i C:/Users/Adam/.ssh/private-passphrase r
diff-backup --server
Enter passphrase for key 'C:/Users/Adam/.ssh/private-passphrase':
Found interrupted initial backup. Removing...
Hardlinks disabled by default on Windows
Unable to import module xattr.
Extended attributes not supported on filesystem at C:/Users/Adam/Desktop
Unable to import module posix1e from pylibacl package.
POSIX ACLs not supported on filesystem at C:/Users/Adam/Desktop
escape_dos_devices not required by filesystem at C:/Users/Adam/Desktop
Detected abilities for source (read only) file system:
  Access control lists                         Off
  Extended attributes                          Off
  Windows access control lists                 On
  Case sensitivity                             Off
  Escape DOS devices                           Off
  Escape trailing spaces                       Off
  Mac OS X style resource forks                Off
  Mac OS X Finder information                  Off
POSIX ACLs not supported by filesystem at /media/exthdd1/backup/rdiff-backup-dat
Unable to import win32security module. Windows ACLs
not supported by filesystem at /media/exthdd1/backup/rdiff-backup-data/rdiff-bac
escape_dos_devices not required by filesystem at /media/exthdd1/backup/rdiff-bac
Detected abilities for destination (read/write) file system:
  Ownership changing                           Off
  Hard linking                                 On
  fsync() directories                          On
  Directory inc permissions                    Off
  High-bit permissions                         Off
  Symlink permissions                          Off
  Extended filenames                           On
  Windows reserved filenames                   Off
  Access control lists                         Off
  Extended attributes                          On
  Windows access control lists                 Off
  Case sensitivity                             On
  Escape DOS devices                           Off
  Escape trailing spaces                       Off
  Mac OS X style resource forks                Off
  Mac OS X Finder information                  Off
Backup: must_escape_dos_devices = 0
Symbolic links excluded by default on Windows
Starting mirror C:/Users/Adam/Desktop to /media/exthdd1/backup
Processing changed file .
Processing changed file Git Shell.lnk
Sending back exception [Errno 1] Operation not permitted: '/media/exthdd1/backup
/rdiff-backup.tmp.4' of type <type 'exceptions.OSError'>:
E  File "/usr/lib/python2.7/dist-packages/rdiff_backup/connection.py", line 335,
 in answer_requestxception '[Errno 1] Operation not permitted: '/media/exthdd1/b
    result = apply(eval(request.function_string), argument_list)Traceback (most
recent call last):up\Main.pyc", line 304, in error_check_Main
  File "rdiff_backup\Main.pyc", line 324, in Main
  File "rdiff-backup", line 30, in <module>n take_action
  File "/usr/lib/python2.7/dist-packages/rdiff_backup/backup.py", line 232, in p
atchle "rdiff_backup\backup.pyc", line 38, in Mirror
  File "rdiff_backup\Main.pyc", line 304, in error_check_Main
    ITR(diff.index, diff)ection.pyc", line 370, in reval
  File "/usr/lib/python2.7/dist-packages/rdiff_backup/rorpiter.py", line 281, in
 __call__  File "rdiff_backup\Main.pyc", line 324, in Main
    last_branch.fast_process(*args)  File "rdiff_backup\Main.pyc", line 280, in
  File "/usr/lib/python2.7/dist-packages/rdiff_backup/backup.py", line 529, in f
ast_process  File "rdiff_backup\Main.pyc", line 346, in Backup
    if self.patch_to_temp(mirror_rp, diff_rorp, tf):
  File "/usr/lib/python2.7/dist-packages/rdiff_backup/backup.py", line 559, in p
atch_to_temp  File "rdiff_backup\connection.pyc", line 450, in __call__

    rpath.copy_attribs(diff_rorp, new)OSError0, in reval
  File "/usr/lib/python2.7/dist-packages/rdiff_backup/rpath.py", line 189, in co
    rpout.chmod(rpin.getperms())Errno 1] Operation not permitted: '/media/exthdd
  File "/usr/lib/python2.7/dist-packages/rdiff_backup/rpath.py", line 927, in ch
    self.conn.os.chmod(self.path, permissions & Globals.permission_mask)

Fatal Error: Lost connection to the remote system`

Attempts to resolve

  • I thought it was permissions but my target directory is 777
  • I've tried running CMD as admin
  • Adding my Windows user account to the user group Users
  • Got half way through setting up Cygwin to have sshd service but kept getting "Error 1053: Could not start service" so gave up. I tried to do this because I thought SSH aliases would simplify the command and to see if it got me anywhere, something about the placeholder %s makes me feel sick so I thought if I could get around using it then I might get somewhere. Does anyone think SSH aliases is even worth still pursuing?

closed as off-topic by Jeff Schaller, HalosGhost, countermode, slm Nov 15 '16 at 14:12

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, HalosGhost, countermode, slm
If this question can be reworded to fit the rules in the help center, please edit the question.


The problem was indeed in /etc/fstab - I added the gid and uid values to the target drive's line of the user pi.

  • Worked for me too, I did not understand exactly why though. But the directory must apparently be mounted as the exact user that does the backup neither group permissions or a full 777 as some other user worked. ( Even though I manually could enter the directory and modify files ). – Zitrax Nov 17 '16 at 9:55

Errno 1 is "Operation not permitted", so it's definitely permissions, and apparently permissions on the Linux side.

On the Linux side, you've checked that the target directory is 777, but you'll need to also make sure that the user that's running rdiff-backup is able to navigate down to the directory. Check both /media/exthdd1 and /media.

  • /media is also 777 – adampski Jul 10 '15 at 15:12
  • / is 755 but I don't think it's wise to change that to 775. Moving the target directoy to the user pi's home directory worked... Thoughts on putting it in /media/exthdd1/? – adampski Jul 10 '15 at 15:16
  • Ah, ok. You don't need write permission, just read and execute to get down to your target directory. Did you check the perms on /media/exthdd1? Also, assuming that it's an external drive, check the output of mount to make sure it's not mounted read-only! – Mike Andrews Jul 10 '15 at 15:19
  • /media/exthdd is 777 and /dev/sda1 is not on read only. My user can right to that drive no problem. – adampski Jul 10 '15 at 15:23
  • What type of filesystem is mounted on /media/exthdd ? It's likely that rdiff-backup may need to do either symlinks or hardlinks there. If it's an external drive formatted with vfat or something, that's going to fail – Mike Andrews Jul 10 '15 at 17:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.