设置linux用户的正确方法是什么?当多个用户同步到同一远程位置时组?
我有多个开发人员尝试将文件(symfony php 项目)rsync 到同一远程位置。设置如下:
- 每个用户在远程服务器上都有自己的登录名
- 每个用户都是服务器上同一组的成员,例如“mygroup”
- 本地文件和 rsync 目标处的文件由用户和组拥有。例如 someuser:mygroup
据我所知,您必须拥有一个目录才能将其访问和修改时间设置为任意值,作为拥有组的成员是不够的。因此,如果用户 A 尝试 rsync 用户 B 拥有的目录,rsync 会输出以下错误:
rsync: failed to set times on "/some/path": Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1058) [sender=3.0.5]
那么,设置用户和用户的正确方法是什么?当多个用户同步到同一远程位置时组?
I have multiple developers trying to rsync files (symfony php projects) to the same remote location. This has been setup as follows:
- Each user has their own login on the remote server
- Each user is a member of the same group on the server, say "mygroup"
- Files locally and at the rsync destination are owned by a user and the group. E.g. someuser:mygroup
As far as I am aware you must own a directory in order to set its access and modification times to an arbitrary value, being a member of the owning group is not enough. For this reason if user A tries to rsync directories owned by user B rsync outputs the following errors:
rsync: failed to set times on "/some/path": Operation not permitted (1)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1058) [sender=3.0.5]
So, what is the correct way to setup users & groups when multiple users rsync to the same remote location?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Let_Me_Be 所说的然后从 Git(或 Mercurial)部署到测试或登台,然后从那里 rsync 到实时。最好还是使用 Hudson/Jenkins 之类的东西来为你管理整个投篮比赛。
What Let_Me_Be said then deploy from Git (or Mercurial) to testing or staging then rsync from there to live. Better still use something like Hudson/Jenkins to manage the whole shooting match for you.