lxd/endpoints/local.go
func localSetAccess(path string, group string) error {
	err := socketUnixSetPermissions(path, 0660)
	if err != nil {
		return err
	}

	err = socketUnixSetOwnership(path, group)
	if err != nil {
		return err
	}

	return nil
}
func localSetAccess(path string, group string) error {
	err := socketUnixSetPermissions(path, 0660)
	if err != nil {
		return err
	}

	err = socketUnixSetOwnership(path, group)
	if err != nil {
		return err
	}

	return nil
}
// Change the file mode and ownership of the local endpoint unix socket file,
// so access is granted only to the process user and to the given group (or the
// process group if group is empty).