客观的

客观的

客观的

我正在尝试在 Python 脚本中执行以下命令:

rdiff-backup --terminal-verbosity=5 --remote-schema "ssh %s -p1019 -i C:/Users/Adam/.ssh/private-passphrase rdiff-backup --server" C:/Users/Adam/桌面[电子邮件受保护]::/media/exthdd1/备份

我的源目录来自 Windows 操作系统,我的目标目录是基于 Debian 的系统。

问题

我得到这个输出:

`Using rdiff-backup version 1.2.8
Executing ssh [email protected] -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
a/rdiff-backup.tmp.0
Unable to import win32security module. Windows ACLs
not supported by filesystem at /media/exthdd1/backup/rdiff-backup-data/rdiff-bac
kup.tmp.0
escape_dos_devices not required by filesystem at /media/exthdd1/backup/rdiff-bac
kup-data/rdiff-backup.tmp.0
-----------------------------------------------------------------
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
py_attribs:
    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
mod
    self.conn.os.chmod(self.path, permissions & Globals.permission_mask)

Fatal Error: Lost connection to the remote system`

尝试解决

  • 我以为是权限问题,但我的目标目录是777
  • 我尝试以管理员身份运行 CMD
  • 将我的 Windows 用户帐户添加到用户组 Users
  • 在设置 Cygwin 以获得 sshd 服务的过程中,但不断收到“错误 1053:无法启动服务”,因此放弃了。我尝试这样做是因为我认为 SSH 别名会简化命令,并看看它是否能让我到达任何地方,占位符的某些内容%s让我感到恶心,所以我想如果我可以绕过使用它,那么我可能会到达某个地方。有人认为 SSH 别名值得继续追求吗?

答案1

问题确实在/etc/fstab- 我将giduid值添加到用户的目标驱动器行中pi

答案2

Errno 1是“不允许操作”,所以肯定是权限问题,而且显然是Linux端的权限问题。

在 Linux 方面,您已检查目标目录是否为 777,但您还需要确保正在运行的用户rdiff-backup能够向下导航到该目录。检查/media/exthdd1/media

相关内容