rsync over SSH preserve ownership only for www-data owned files

后端 未结 6 1492
轮回少年
轮回少年 2021-02-05 16:36

I am using rsync to replicate a web folder structure from a local server to a remote server. Both servers are ubuntu linux. I use the following command, and it works well:

6条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-05 16:47

    As far as I know, you cannot chown files to somebody else than you, if you are not root. So you would have to rsync using the www-data account, as all files will be created with the specified user as owner. So you need to chown the files afterwards.

提交回复
热议问题