如何告诉rsync忽略权限检查并仅按大小检查?
谢谢.
解决方法
以供参考:
http://linux.die.net/man/1/rsync
-r,--recursive recurse into directories -v,--verbose increase verbosity -z,--compress compress file data during the transfer -n,--dry-run perform a trial run with no changes made -p,--perms preserve permissions -E,--executability preserve executability --chmod=CHMOD affect file and/or directory permissions
-p,–perms This option causes the receiving rsync to set the destination permissions to be the same as the source permissions. (See
also the –chmod option for a way to modify what rsync considers to be
the source permissions.)
该手册继续说:
In summary: to give destination files (both old and new) the source
permissions,use –perms. To give new files the destination-default
permissions (while leaving existing files unchanged),make sure that
the –perms option is off and use –chmod=ugo=rwX (which ensures that
all non-masked bits get enabled).
附注:如果可能的话,您的开发人员可能更有意义将其更改推回到仓库中,并让所有服务器使用代码仓库,而不是使用rsync将文件从一台服务器发送到另一台服务器.
原文地址:https://www.jb51.cc/linux/395639.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。