code: func (p *nfsProvisioner) createDirectory(directory, gid string) error {
  	// TODO quotas
  	path := path.Join(p.exportDir, directory)
  	if _, err := os.Stat(path); !os.IsNotExist(err) {
  		return fmt.Errorf("the path already exists")
  	}
  
  	perm := os.FileMode(0777 | os.ModeSetgid)
  	if gid != "none" {
  		// Execute permission is required for stat, which kubelet uses during unmount.
  		perm = os.FileMode(0071 | os.ModeSetgid)
  	}
  	if err := os.MkdirAll(path, perm); err != nil {
  		return err
  	}
  	// Due to umask, need to chmod
  	if err := os.Chmod(path, perm); err != nil {
  		os.RemoveAll(path)
  		return err
  	}
  
  	if gid != "none" {
  		groupID, err := strconv.ParseUint(gid, 10, 64)
  		if err != nil {
  			os.RemoveAll(path)
  			return fmt.Errorf("strconv.ParseUint failed with error: %v", err)
  		}
  		cmd := exec.Command("chgrp", strconv.FormatUint(groupID, 10), path)
  		out, err := cmd.CombinedOutput()
  		if err != nil {
  			os.RemoveAll(path)
  			return fmt.Errorf("chgrp failed with error: %v, output: %s", err, out)
  		}
  	}
  
  	return nil
  }
docs: // createDirectory creates the given directory in exportDir with appropriate
  // permissions and ownership according to the given gid parameter string.