Merge pull request #1576 from smdahlen/fix-ssh-username
Fix use of config.ssh.username and reset provisioning path permissions.
This commit is contained in:
commit
fef053e58e
|
@ -42,7 +42,7 @@ module VagrantPlugins
|
|||
def chown_provisioning_folder
|
||||
@machine.communicate.tap do |comm|
|
||||
comm.sudo("mkdir -p #{@config.provisioning_path}")
|
||||
comm.sudo("chown #{@machine.config.ssh.username} #{@config.provisioning_path}")
|
||||
comm.sudo("chown -R #{@machine.ssh_info[:username]} #{@config.provisioning_path}")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,6 +12,11 @@ module VagrantPlugins
|
|||
with_script_file do |path|
|
||||
# Upload the script to the machine
|
||||
@machine.communicate.tap do |comm|
|
||||
# Reset upload path permissions for the current ssh user
|
||||
user = @machine.ssh_info[:username]
|
||||
comm.sudo("chown -R #{user} #{config.upload_path}",
|
||||
:error_check => false)
|
||||
|
||||
comm.upload(path.to_s, config.upload_path)
|
||||
|
||||
if config.path
|
||||
|
|
Loading…
Reference in New Issue