+7
−0
Loading
Prior this commit, we always tried to set user and group with rsync --chown option. Though some virtual hosting providers can have a very weird permissions on folders. The noticeable case here is beget: The $HOME folder and individual websites folders are own by root to quote: "prevent accidental folder deletion". Our rsync params doesn't play nice with that approach. And actually setting user and group in case we connect to the server on behalf of non-root user doesn't make a lot of sense. This user anyway has not permission to change owner to not-themselves. To solve this, I've introduced new RSYNC_ADMIN_PARAMS variable. It encapsulates all common rsync params and conditionally sets chown option in case of we connect on behalf of root user.