O problema foi de fato em /etc/fstab
- adicionei os valores gid
e uid
à linha da unidade de destino do usuário pi
.
Estou tentando executar o seguinte comando no meu script Python:
rdiff-backup --terminal-verbosity=5 --remote-schema "ssh %s -p1019 -i C:/Users/Adam/.ssh/private-passphrase rdiff-backup --server" C:/Users/Adam/Desktop [email protected]::/media/exthdd1/backup
Meu diretório de origem é de um sistema operacional Windows e meu diretório de destino é um sistema baseado no Debian.
Eu recebo esta saída:
'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'
%s
me faz sentir mal, então achei que, se conseguisse usá-lo, poderia chegar a algum lugar. Alguém acha que os aliases SSH valem a pena continuar? Errno 1 é "Operação não permitida", por isso é definitivamente permissões e, aparentemente, permissões no lado do Linux.
No lado do Linux, você verificou se o diretório de destino é 777, mas também precisa garantir que o usuário que está executando rdiff-backup
consiga navegar até o diretório. Verifique os dois /media/exthdd1
e /media
.
Tags command-line ssh rdiff-backup