设置linux用户的正确方法是什么?当多个用户同步到同一远程位置时组?

发布于 2024-11-16 22:52:32 字数 546 浏览 3 评论 0原文

我有多个开发人员尝试将文件(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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

灯下孤影 2024-11-23 22:52:32

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文