-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rsync does not respect ownership in certain cases. #3196
Comments
Incidentally, looks like if I prevent the folders from syncing initially, and then run |
Looks like I'm a stupid idiot who doesn't understand proper use of the --perms flag! |
I'm really just too eager. This still happens even without the --perms flag (guess that means I did know what it was doing!). |
So there seems to be multiple problems with the way rsync-auto is implemented...
rsync-auto doesn't seem to obey the flags I specified for each folder with rsync__args, nor does it play well with the |
I figured out a portion of this problem - OSX seems to come with an old version of rsync that tries to set times on symlinks, which fails miserably. I installed a newer version from brew and that rsync-auto problem went away. However, I still receive the error message about remote host identification changing when I do a reload, and all my files get the ownership of vagrant:vagrant.
|
I've also seen this, where rsync sets file/folder permissions to vagrant:vagrant and so my provision scripts are fighting against rsync. The workaround for me was to stick all the folders I needed to enforce the permissions on behind a symlink but I don't think this is a good general solution. |
You have to set the |
This issue still exists with Vagrant 1.6.2 in conjunction with rsync-auto. Platform: Windows 7 x86_64 shared_folder_path = "./code/"
target_code_path = "/var/www/"
config.vm.synced_folder shared_folder_path, target_code_path,
type: "rsync",
owner: "tomcat7",
group: "tomcat7"
Also tried killing the vagrant box and provisioned it again, but same result. |
Still having the issue on OSX, Vagrant 1.6.3. Initi |
It's only "fixed" if you also set "chown: false" in the rsync config. It's in the docs for 1.6+ |
On an initial
vagrant up
, my synced folders act as expected - they are rysnced and chowned to deploy:usersBut after that, running
vagrant reload
orvagrant rsync
gives this error (warning, EXTREMELY long error): https://gist.github.com/drpebcak/9537952Essentially what it is doing is taking all my files and chowning them back to vagrant:vagrant, even though I don't want that!
The text was updated successfully, but these errors were encountered: