diff --git a/ebs.go b/ebs.go index 949d294..e666eb9 100644 --- a/ebs.go +++ b/ebs.go @@ -185,10 +185,13 @@ func ensureVolumeMounted(blockDeviceOS, mountPoint string) error { } func ensureVolumeWriteable(mountPoint string) error { - log.Printf("Ensuring %s is r/w by etcd\n", mountPoint) + log.Printf("Ensuring %s is r/w by etcd only\n", mountPoint) if err := exec.Command("sudo", "/usr/bin/chown", "-R", "etcd:etcd", mountPoint).Run(); err != nil { return errors.Wrapf(err, "cannot make %s writeable by etcd", mountPoint) } + if err := exec.Command("sudo", "/usr/bin/chmod", "-R", "700", mountPoint).Run(); err != nil { + return errors.Wrapf(err, "cannot set permissions on %s for etcd", mountPoint) + } return nil }