sdk/enter: create .gnupg if it does not exist
Create ~/.gnupg if it does not exist, otherwise entering a fresh sdk
will fail.
@@ -197,6 +197,10 @@ func (e *enter) mountGnupg() error {
// now mount the agent socket directory through
newHome := filepath.Join(e.Chroot, e.User.HomeDir, ".gnupg")
+ if err := os.Mkdir(newHome, 0700); err != nil && !os.IsExist(err) {
+ return err
+ }
+
if err := system.Bind(origHome, newHome); err != nil {
return err
}
