Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to change the owner for a rsync
    primarykey
    data
    text
    <p>I understand preserving the permissions for rsync. However in my case my local computer does not have the user the files need to under for the webserver. So when I rsync I need the owner and group to be apache on the webserver, but be my username on my local computer. Any suggestions?</p> <p>I wanted to clarify to explain exactly what I need done.</p> <p>My personal computer: named 'home' with the user account 'michael' My web server: named 'server' with the user account 'remote' and user account 'apache'</p> <p>Current situation: My website is on 'home' with the owner 'michael' and on 'server' with the owner 'apache'. 'home' needs to be using the user 'michael' and 'server' needs to be using the user 'apache'</p> <p>Task: rsync my website on 'home' to 'server' but have all the files owner by 'apache' and the group 'apache'</p> <p>Problem: rsync will preseve the permissions, owner, and group; however, I need all the files to be owner by apache. I know the not preseving the the owner will put the owner of the user on 'server' but since that user is 'remote' then it uses that instead of 'apache'. I can not rsync with the user 'apache' (which would be nice), but a security risk I'm not willing to open up.</p> <p>My only idea on how to solve: after each rsync manually chown -R and chgrp -R, but it's a huge system and this takes a long time, especially since this is going to production.</p> <p>Does anyone know how to do this?</p> <p>Current command I use to rsync: rsync --progress -rltpDzC --force --delete -e "ssh -p22" ./ remote@server.com:/website</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload