provisioner/shell: chmod uploaded file to 0777 [GH-994]
This commit is contained in:
parent
ec30d574c1
commit
9365b879c0
|
@ -47,6 +47,7 @@ BUG FIXES:
|
|||
* provisioner/ansible: set cwd to staging directory [GH-1016]
|
||||
* provisioners/chef-client: Don't chown directory with Ubuntu. [GH-939]
|
||||
* provisioners/shell: Env var values can have equal signs. [GH-1045]
|
||||
* provisioners/shell: chmod the uploaded script file to 0777. [GH-994]
|
||||
* post-processor/docker-push: Allow repositories with ports. [GH-923]
|
||||
* post-processor/vagrant: Create parent directories for `output` path [GH-1059]
|
||||
|
||||
|
|
|
@ -273,6 +273,16 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||
return fmt.Errorf("Error uploading script: %s", err)
|
||||
}
|
||||
|
||||
cmd = &packer.RemoteCmd{
|
||||
Command: fmt.Sprintf("chmod 0777 %s", p.config.RemotePath),
|
||||
}
|
||||
if err := comm.Start(cmd); err != nil {
|
||||
return fmt.Errorf(
|
||||
"Error chmodding script file to 0777 in remote "+
|
||||
"machine: %s", err)
|
||||
}
|
||||
cmd.Wait()
|
||||
|
||||
cmd = &packer.RemoteCmd{Command: command}
|
||||
return cmd.StartWithUi(comm, ui)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue