rsync-mkstemp失败:权限被拒绝(13) [英] rsync - mkstemp failed: Permission denied (13)

查看:1413
本文介绍了rsync-mkstemp失败:权限被拒绝(13)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有以下设置来定期将文件从服务器A同步到服务器B.服务器B的rsync守护进程运行以下配置:

I have the following setup to periodically rsync files from server A to server B. Server B has the rsync daemon running with the following configuration:

read only = false
use chroot = false
max connections = 4
syslog facility = local5
log file = /var/adm/rsyncd.log
munge symlinks = false
secrets file = /etc/rsyncd.secrets
numeric ids = false
transfer logging = true
log format = %h %o %f %l %b


[BACKUP]
        path = /path/to/archive
        auth users = someuser

我从服务器A发出以下命令:

From server A I am issuing the following command:

rsync -adzPvO --delete --password-file=/path/to/pwd/file/pwd.dat /dir/to/be/backedup/ someuser@192.168.100.100::BACKUP

BACKUP目录对每个人都是完全读/写/执行的.当我从服务器A运行rsync命令时,我看到:

BACKUP directory is fully read/write/execute to everyone. When I run the rsync command from server A, I see:

afile.txt
         989 100%    2.60kB/s    0:00:00 (xfer#78, to-check=0/79)

对于我要备份的目录中的每个文件.当我要写入tmp文件时,它会失败:

for each and everyfile in the directory I wish to backup. It fails when I get to writing tmp files:

rsync: mkstemp "/.afile.txt.PZQvTe" (in BACKUP) failed: Permission denied (13)

数小时的谷歌搜索之后,我仍然无法解决似乎很简单的权限问题.建议?预先感谢.

Hours of googling later and I still can't resolve what seems to be a very simple permission issue. Advice? Thanks in advance.

其他信息

我刚刚注意到在过程开始时发生了以下情况:

I just noticed the following occurs at the beginning of the process:

rsync: failed to set permissions on "/." (in BACKUP): Permission denied (13)

是否要在"/"上设置权限?

Is it trying to set permission on "/"?

修改

我以用户-someuser的身份登录.我的目标目录对每个人都具有完全的读/写/执行权限,包括其内容.另外,目标目录由someuser拥有,并且属于someuser的组.

I am logged in as the user - someuser. My destination directory has full read/write/execute permission for everyone, including it's contents. In addition, the destination directory is owned by someuser and in someuser's group.

关注

我发现使用SSH可以解决此问题

I've found using SSH solves this

推荐答案

确保rsync到远程计算机上的用户具有对文件夹内容和文件夹本身的写访问权限,因为rsync试图这样做更新文件夹本身的修改时间.

Make sure the user you're rsync'd into on the remote machine has write access to the contents of the folder AND the folder itself, as rsync tried to update the modification time on the folder itself.

这篇关于rsync-mkstemp失败:权限被拒绝(13)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆