我使用此guide在我的树莓派2上设置了rsync。
我正在步骤" 18。 Raspberry Pi上的备份控制文件",这是产生错误的代码:
if [[ ${now} != ${last} ]]
then
# New Month
mkdir -p "${basePath}/current/"
rm -Rf "${basePath}/current/"*
echo "${now}" > "checkMonth.txt"
fi
我自己使用Windows 10 64bit。它在我的笔记本电脑上正常工作,但我在桌面上产生了以下错误。
rsync: recv_generator: mkdir "/home/backupuser/current/***/***" failed: Permission denied (13)
*** Skipping any contents from this failed directory ***
该脚本创建了pi上任何用户都无法访问的文件夹。在笔记本电脑上一切仍然正常。我的桌面ssh也可以正常工作。
文件夹拥有权限:--- rwx ---
我不认为这个问题与rsync - mkstemp failed: Permission denied (13)有关,因为我已经在使用ssh而且错误信息不同。