我正在尝试在我的家庭Ubuntu 14.04 i686服务器(这是备份存储)之间rsync文件并且将FreeBSD 10.3-PRERELEASE#5 amd64(这是web服务器)监禁。
我使用以下命令(真正的IP肯定是另一个):
rsync -uvrhtl --delete-after -e="ssh -l user -p 2222" 8.8.8.8:/hosting/my.site /backup/my.site
我得到以下错误:
Password for user@example.com:
receiving file list ... Connection to 8.8.8.8 closed by remote host.
rsync: connection unexpectedly closed (16384 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.1]
同时scp工作正常:
$ scp -P 2222 user@8.8.8.8:/hosting/my.site/index.php /backup/my.site/
Password for user@example.com:
index.php
$ ls /backup/my.site/index.php
-rw-r--r-- 1 user user 418 Jan 25 17:00 /backup/my.site/index.php
如果我尝试在FreeBSD上做同样的事情,我会跟随
rsync -uvrhtl user@home.com:/backup/my.site ~/tmp/
user@home.com's password:
receiving incremental file list
created directory /home/user/tmp
./
site-folders-and-files/
...
...
...
site-folders-and-files/folders/folders/README
Write failed: Permission denied
rsync: connection unexpectedly closed (58914 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.1]
rsync: connection unexpectedly closed (67040 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [generator=3.1.1]
rsync版本如下。 FreeBSD的:
user@freebsd % rsync --version
rsync version 3.1.1 protocol version 31
Copyright (C) 1996-2014 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 32-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, no iconv, symtimes, no prealloc, file-flags
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
和Ubuntu:
user@ubuntu$ rsync --version
rsync version 3.1.1 protocol version 31
Copyright (C) 1996-2014 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
append, ACLs, xattrs, iconv, symtimes, prealloc
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you
are welcome to redistribute it under certain conditions. See the GNU
General Public Licence for details.
感谢您的任何想法。
答案 0 :(得分:1)
解决。原因在于FreeBSD jail配置。如何解决问题:
/etc/sysctl.conf
集中
net.inet.tcp.tso=0
/etc/ssh/sshd_config
添加UsePAM yes