Ale*_*x S 5 acl permissions windows rsync ntfs
我可以可靠地使用 Rsync 的哪些选项/如何/将其组合到:
\n\n即使权限/ ACL 的“有限集”可靠且在 Cygwin Windows/NTFS 和 *Nix/Perms 等的灰色区域之间不发生冲突,也可以可靠地传输“工作”
\nOR
如果我不能执行上述操作,请刷新干净/让 RSync 完全避免权限/ACL 问题?
在过去十年左右的时间里,我已经阅读了近 50 个关于如何解决此问题的选项卡和窗口。
\n\n如何处理它似乎会根据您询问的地点和对象以及正在讨论的 Rsync 版本(时间和变化/替代代码库)而变化。
\n\n可供选择的选项:
\n\n我从这个 QnA 中得到了关于如何针对这个特定场景执行 RSync 的答案;
\n\n\n\n但在收集了 RSync 上有关 Cygwin、NTFS、权限和 ACL 等的所有“知识”后,我不确定哪些变化会影响如何继续进行。
\n\n\n\n\n事实证明,为了控制您的 Windows 权限,需要一个简单的 chmod 标志。
\n
\n\xe2\x80\x94chmod=ugo=rwX
Rsync 选项(一些..)
\n\n -p, --perms preserve permissions\n -E, --executability preserve the file\'s executability\n --chmod=CHMOD affect file and/or directory permissions\n\n -A, --acls preserve ACLs (implies --perms)\n -o, --owner preserve owner (super-user only)\n -g, --group preserve group\n --devices preserve device files (super-user only)\n --specials preserve special files\n -D same as --devices --specials\n\n\n
Run Code Online (Sandbox Code Playgroud)\n\n/etc/fstab(添加noacl)
\n\n\n# /etc/fstab\n#\n# This file is read once by the first process in a Cygwin process tree.\n# To pick up changes, restart all Cygwin processes. For a description\n# see https://cygwin.com/cygwin-ug-net/using.html#mount-table\n\n# This is default anyway:\n# none /cygdrive cygdrive binary,posix=0,user 0 0\nnone /cygdrive cygdrive binary,posix=0,user,noacl 0 0\n\n
Run Code Online (Sandbox Code Playgroud)\n
过去几天我一直在研究这个问题,在阅读了大量参考资料并实际尝试了各种标志组合后,我认为它不会rsync
携带 Windows ACL。
rsync -aX src/ dst/
rsync: extended attributes are not supported on this client
Run Code Online (Sandbox Code Playgroud)
我发现这个建议是使用noacl重新安装本地 NTFS 驱动器的 Cygwin 视图,但我无法让它对我有用。另一个使用建议--chmod=ugo=rwX
根本没有帮助。
似乎对于这个特定的用例,您需要使用类似的东西ROBOCOPY /SEC
而不是rsync
.