Billionmail/BillionMail · error

group not exists:

Error message

group not exists: 

What it means

Guard in Chgrp: user.LookupGroup resolved the group name, but the resulting Gid converts to a value < 1, which cannot be a real group ID. In practice this means the lookup returned a placeholder/invalid entry (or the name matched something with gid 0 semantics rejected by this check), so the recursive chgrp is refused before touching any files.

Source

Thrown at core/internal/service/public/common.go:1427

		fmt.Println(err.Error())
		return 0, 0
	}

	return gconv.Int(userInfo.Uid), gconv.Int(userInfo.Gid)
}

// Change group of a file or directory (recursive)
func Chgrp(path, groupName string) error {
	grp, err := user.LookupGroup(groupName)

	if err != nil {
		return err
	}

	gid := gconv.Int(grp.Gid)

	if gid < 1 {
		return errors.New("group not exists: " + groupName)
	}

	return ChgrpWithGidRecursive(path, gid)
}

// Change group of a file or directory with GID (recursive)
func ChgrpWithGidRecursive(path string, gid int) error {
	// File does not exist
	if !FileExists(path) {
		return errors.New("file not exists: " + path)
	}

	// Directory
	if IsDir(path) {
		ds, err := os.ReadDir(path)

		if err != nil {
			return err

View on GitHub (pinned to fc36c76c05)

Solutions

  1. Check /etc/group (or the group database in use) to confirm the group exists with a valid GID >= 1
  2. Verify the groupName string passed to Chgrp for typos or wrong casing
  3. If gid 0 (root group) is legitimately acceptable, adjust the guard to allow it
  4. Ensure the process can read the group database (NSS/LDAP connectivity in containerized setups)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/internal/service/public/common.go:1427 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Billionmail/BillionMail@fc36c76c05 (2026-09-05). Data as JSON: /api/errors/b79c008b048a63f4. Report an issue: GitHub.