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

查看:33
本文介绍了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.我的目标目录对所有人都有完全的读/写/执行权限,包括它的内容.此外,目标目录归某个用户所有,并在某个用户的组中.

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天全站免登陆