{"record":{"id":"b79c008b048a63f4","repo":"Billionmail/BillionMail","slug":"group-not-exists","errorCode":null,"errorMessage":"group not exists: ","messagePattern":"group not exists: ","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/internal/service/public/common.go","lineNumber":1427,"sourceCode":"\t\tfmt.Println(err.Error())\n\t\treturn 0, 0\n\t}\n\n\treturn gconv.Int(userInfo.Uid), gconv.Int(userInfo.Gid)\n}\n\n// Change group of a file or directory (recursive)\nfunc Chgrp(path, groupName string) error {\n\tgrp, err := user.LookupGroup(groupName)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tgid := gconv.Int(grp.Gid)\n\n\tif gid < 1 {\n\t\treturn errors.New(\"group not exists: \" + groupName)\n\t}\n\n\treturn ChgrpWithGidRecursive(path, gid)\n}\n\n// Change group of a file or directory with GID (recursive)\nfunc ChgrpWithGidRecursive(path string, gid int) error {\n\t// File does not exist\n\tif !FileExists(path) {\n\t\treturn errors.New(\"file not exists: \" + path)\n\t}\n\n\t// Directory\n\tif IsDir(path) {\n\t\tds, err := os.ReadDir(path)\n\n\t\tif err != nil {\n\t\t\treturn err","sourceCodeStart":1409,"sourceCodeEnd":1445,"githubUrl":"https://github.com/Billionmail/BillionMail/blob/fc36c76c050c3775c5e899faf7403cf0262d2744/core/internal/service/public/common.go#L1409-L1445","documentation":"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.","triggerScenarios":"Thrown at core/internal/service/public/common.go:1427 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check /etc/group (or the group database in use) to confirm the group exists with a valid GID >= 1","Verify the groupName string passed to Chgrp for typos or wrong casing","If gid 0 (root group) is legitimately acceptable, adjust the guard to allow it","Ensure the process can read the group database (NSS/LDAP connectivity in containerized setups)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fc36c76c050c3775c5e899faf7403cf0262d2744","analyzedAt":"2026-09-05T21:28:54.019Z","contentChangedAt":"2026-09-05T21:28:54.019Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}