Closed (fixed)
Project:
Drush
Version:
7.x-4.5
Component:
Core Commands
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Sep 2011 at 21:32 UTC
Updated:
14 Oct 2011 at 14:21 UTC
Hi,
I just tried using drush rsync for the first time and I keep getting permission errors like:
rsync: failed to set times on "/var/www/sites/xxx": Operation not permitted (1)
rsync: mkstemp "/var/www/sites/xxx" failed: Permission denied (13)
All of my drupal files are set as www-data and I'm running drush rsync as a different non-root user. Is that the problem? Should I run rsync as a different user? What does everyone else do?
Thanks,
Bob
Comments
Comment #1
greg.1.anderson commentedOn the live site, my web files are owned by www-admin (not the webserver user), and their group is www, which the webserver belongs to, so I chmod g+w things that need to be written by the webserver.
On the dev site, my web files are owned by the user I log in as, and again the group is www.
I insure that I preserve permissions but not owner when I rsync between dev and live. That way I do not need to sudo on dev.
Comment #2
Littlebob commentedGreg, thanks for getting back to me so quickly. What rsync options do you use to keep permissions but not the owner?
Comment #3
greg.1.anderson commentedFrom my drushrc.php:
In my remote site alias, 'remote-user' => 'www-admin', so the user automatically changes when I sync from dev to live.