Billionmail/BillionMail · error
user not exists:
Error message
user not exists:
What it means
Chown resolves the username via GetUidAndGid (os/user Lookup). If lookup fails or resolves to uid==0 or gid==0, it returns "user not exists: <username>". The zero-check also (perhaps unintentionally) rejects root, since root has UID/GID 0.
Source
Thrown at core/internal/service/public/common.go:1482
if err != nil {
return err
}
gid := gconv.Int(grp.Gid)
if gid < 1 {
return errors.New("group not exists: " + groupName)
}
return os.Chown(path, -1, gid)
}
// Change owner of a file or directory (recursive)
func Chown(path, username string) error {
uid, gid := GetUidAndGid(username)
if uid == 0 || gid == 0 {
return errors.New("user not exists: " + username)
}
return ChownWithUidAndGidRecursive(path, uid, gid)
}
// Change owner of a file or directory with UID and GID (recursive)
func ChownWithUidAndGidRecursive(path string, uid, 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 errView on GitHub (pinned to fc36c76c05)
Solutions
- Create the user on the system (useradd) or fix the username in config
- If root is intended, call ChownWithUidAndGidRecursive(path, 0, 0) directly
- Check NSS/LDAP configuration if the user exists but lookups fail inside the container
Example fix
// before public.Chown(dir, "root") // rejected: uid/gid are 0 // after public.ChownWithUidAndGidRecursive(dir, 0, 0) // explicit chown to root
Defensive patterns
Strategy: validation
Validate before calling
func userResolvable(name string) bool {
uid, gid := public.GetUidAndGid(name)
return uid != 0 || gid != 0
} Type guard
func isValidUser(name string) bool {
_, err := user.Lookup(name)
return err == nil && name != "root"
} Try / catch
if err := public.Chown(path, username); err != nil {
if strings.Contains(err.Error(), "user not exists") {
return fmt.Errorf("system user %q missing on this host; run provisioning", username)
}
return err
} Prevention
- Provision system users in Dockerfiles/entrypoint before app start
- Validate configured usernames at startup, fail fast
- Remember uid/gid 0 (root) is rejected; use the UID/GID API for root
- Verify NSS/LDAP availability inside containers
When it happens
Trigger: Calling Chown(path, username) where the username does not exist on the host, the user DB (LDAP/NSS) is unreachable, or the username is "root" (uid/gid 0 is treated as not-found).
Common situations: Config references a service user (e.g. www, vmail) that was never created in the container; user exists only in the host but not inside the Docker image; root ownership intended but blocked by the zero check.
Related errors
- file not exists:
- unable to determine domain for noreply email
- failed to create email sender: %w
- failed to send confirmation email: %w
- No log files found
AI-assisted analysis of Billionmail/BillionMail@fc36c76c05 (2026-09-05).
Data as JSON: /api/errors/26692f4848bc3608.
Report an issue: GitHub.