{"record":{"id":"50568507baeeac12","repo":"Billionmail/BillionMail","slug":"specified-user-not-valid","errorCode":null,"errorMessage":"specified user not valid","messagePattern":"specified user not valid","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/internal/service/public/common.go","lineNumber":1377,"sourceCode":"\ts := g.Server(consts.DEFAULT_SERVER_NAME)\n\tif s != nil {\n\t\ts.Shutdown()\n\t\ts.Start()\n\t}\n}\n\n// Retrieve mountpoint by user\nfunc RetrieveMountpointByUser(username string) (mountpoint string, err error) {\n\t// Get user home directory\n\tuserInfo, err := user.Lookup(username)\n\tif err != nil {\n\t\treturn\n\t}\n\n\t// Get home directory\n\thomepath := userInfo.HomeDir\n\tif !strings.Contains(homepath, \"/home/\") {\n\t\terr = errors.New(\"specified user not valid\")\n\t\treturn\n\t}\n\n\t// Use /home/ to split home directory, take the first part as mountpoint\n\tmountpoint = strings.Split(homepath, \"/home/\")[0]\n\n\tif mountpoint == \"\" {\n\t\tmountpoint = \"/\"\n\t}\n\n\tif !FileExists(mountpoint) {\n\t\terr = errors.New(\"mountpoint not exists\")\n\t\treturn\n\t}\n\n\treturn\n}\n","sourceCodeStart":1359,"sourceCodeEnd":1395,"githubUrl":"https://github.com/Billionmail/BillionMail/blob/fc36c76c050c3775c5e899faf7403cf0262d2744/core/internal/service/public/common.go#L1359-L1395","documentation":"Guard in RetrieveMountpointByUser: user.Lookup succeeded, but the resolved account's HomeDir does not contain '/home/', so the function's assumption that users live under a /home/<user> layout is violated (e.g. a system account with /var, /root, or /srv home). It rejects the username rather than guessing a mountpoint.","triggerScenarios":"Thrown at core/internal/service/public/common.go:1377 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the username passed in is a real tenant account, not a system user like root or www-data","Check /etc/passwd for the account's home directory layout","Restructure mountpoint derivation to not depend on the /home/ convention","Pass an explicit mountpoint instead of deriving it from the username"],"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-14T00:17:10.932Z"}