diff --git a/builder/amazon/chroot/communicator.go b/builder/amazon/chroot/communicator.go index 6e4387aa0..b27c7c72d 100644 --- a/builder/amazon/chroot/communicator.go +++ b/builder/amazon/chroot/communicator.go @@ -53,7 +53,8 @@ func (c *Communicator) Start(cmd *packer.RemoteCmd) error { func (c *Communicator) Upload(dst string, r io.Reader) error { dst = filepath.Join(c.Chroot, dst) - f, err := os.Open(dst) + log.Printf("Uploading to chroot dir: %s", dst) + f, err := os.Create(dst) if err != nil { return err } @@ -68,6 +69,7 @@ func (c *Communicator) Upload(dst string, r io.Reader) error { func (c *Communicator) Download(src string, w io.Writer) error { src = filepath.Join(c.Chroot, src) + log.Printf("Downloading from chroot dir: %s", src) f, err := os.Open(src) if err != nil { return err