Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Changing override.ssh.username on an existing machine breaks rsync step #174

Closed
maljub01 opened this issue Dec 12, 2013 · 0 comments
Closed

Comments

@maljub01
Copy link
Contributor

Changing override.ssh.username on an existing machine breaks rsync step due to an error in permissions.

Steps to reproduce:

  1. Set override.ssh.username to "root"
  2. vagrant up
  3. Change override.ssh.username to "ubuntu"
  4. vagrant provision

The output of the last step will be as follows:

There was an error when attempting to rsync a share folder.
Please inspect the error message below for more info.

Host path: ...
Guest path: /vagrant
Error: Warning: Identity file [".../.ssh/id_rsa"] not accessible: No such file or directory.
rsync: failed to set permissions on "/vagrant/...": Operation not permitted (1)
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]

After looking at the machine and code, it looks like this is happening because the sync_folders step changes the owner of the rsync target's guest path to the correct user, but doesn't do so recursively, which causes rsync to fail when it tries to touch anything inside /vagrant.
#98 & #171 might be related, but I'm not too sure.

sevos added a commit to sevos/vagrant-aws that referenced this issue Apr 8, 2014
* mitchellh/master: (82 commits)
  Ignore some RVM files in the repo
  Gemspec was too strict, fog should follow semver
  improved error message for missing ami now includes region info
  update copyright year
  fix security_groups override test
  set version back to dev
  release 0.4.1
  bump fog.io to 1.18.0
  use latest vagrant
  Fix mitchellh#174
  Add ProvisionerCleanup to the destroy action middleware stack
  Fix Vagrant 1.4 compatibility and support multiple SSH keys
  Release Elastic IP before destroying
  add rsync guest test
  fix typo
  fixes mitchellh#158 make sure security_groups is an array
  support user specified rsync excludes.
  add optimized ebs flag
  add monitoring flag
  and the dev goes on
  ...

Conflicts:
	lib/vagrant-aws/action.rb
	lib/vagrant-aws/action/read_ssh_info.rb
	lib/vagrant-aws/action/run_instance.rb
	lib/vagrant-aws/config.rb
	lib/vagrant-aws/errors.rb
	locales/en.yml
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant