mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
Merge pull request #3166 from ephemeralsnow/master
Add chmod to chef-solo provisioner
This commit is contained in:
commit
a6552f7c75
1 changed files with 9 additions and 0 deletions
|
|
@ -422,6 +422,15 @@ func (p *Provisioner) createDir(ui packer.Ui, comm packer.Communicator, dir stri
|
|||
return fmt.Errorf("Non-zero exit status. See output above for more info.")
|
||||
}
|
||||
|
||||
// Chmod the directory to 0777 just so that we can access it as our user
|
||||
cmd = &packer.RemoteCmd{Command: p.guestCommands.Chmod(dir, "0777")}
|
||||
if err := cmd.StartWithUi(comm, ui); err != nil {
|
||||
return err
|
||||
}
|
||||
if cmd.ExitStatus != 0 {
|
||||
return fmt.Errorf("Non-zero exit status. See output above for more info.")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue