Skip to content

nginx crashes with initgroups() failed (78: Function not implemented) on FreeBSD 14.4 — same root cause as daemonless/base close_range issue #1

@karmantyu

Description

@karmantyu

bug
nextcloudfreebsd-14

Environment

FreeBSD version | 14.4-RELEASE (amd64) -- | -- Podman | 5.8.2 ocijail | 0.6.0-dev (compiled from source) Image | ghcr.io/daemonless/nextcloud:latest Image created | 2026-05-18T12:45:28Z Base image | ghcr.io/daemonless/nextcloud:build-pkg (nginx base)

Steps to reproduce

podman run -d --name nextcloud_app --network host \
  --annotation 'org.freebsd.jail.allow.mlock=true' \
  --annotation 'org.freebsd.jail.allow.suser=true' \
  -v /ESTANK/nextcloud/config:/config \
  -v /ESTANK/nextcloud/data:/data \
  ghcr.io/daemonless/nextcloud:latest

Observed behavior

2026/05/21 07:21:05 [emerg] 10436#101175: initgroups(bsd, 1000) failed (78: Function not implemented)
2026/05/21 07:21:05 [emerg] 10437#534822: initgroups(bsd, 1000) failed (78: Function not implemented)
connect() to unix:/var/run/php-fpm/php-fpm.sock failed (2: No such file or directory)
Not installed

Root cause

This is the same underlying issue as daemonless/immich-postgres#2 — the base image was built with FREEBSD_MAJOR=15 and contains binaries that call Linux-specific or FreeBSD-15-only syscalls not available on FreeBSD 14.

Specifically, nginx's initgroups() call fails with errno 78 (Function not implemented) inside the jail. This prevents nginx and php-fpm from starting, making Nextcloud completely unusable on FreeBSD 14.4.

io.daemonless.base: nginx
org.opencontainers.image.created: 2026-05-18T12:45:28Z
FREEBSD_MAJOR=15 (in build layers)

What was confirmed working

✓ Container starts and s6 init completes successfully
✓ Nextcloud PHP configuration is generated correctly (/config, /data volumes)
✓ jail params set correctly: allow.mlock=true, allow.suser=true
✗ nginx and php-fpm both fail immediately with initgroups() errno 78

Reference

The fix applied in daemonless/base@ce1ca6a (using setgroups@FBSD_1.0 on FreeBSD 15+) resolved the immich-postgres issue. The same fix needs to be propagated to the nginx base image used by Nextcloud.

bug nextcloud freebsd-14 Environment

FreeBSD version 14.4-RELEASE (amd64)
Podman 5.8.2
ocijail 0.6.0-dev (compiled from source)
Image ghcr.io/daemonless/nextcloud:latest
Image created 2026-05-18T12:45:28Z
Base image ghcr.io/daemonless/nextcloud:build-pkg (nginx base)
Steps to reproduce

podman run -d --name nextcloud_app --network host
--annotation 'org.freebsd.jail.allow.mlock=true'
--annotation 'org.freebsd.jail.allow.suser=true'
-v /ESTANK/nextcloud/config:/config
-v /ESTANK/nextcloud/data:/data
ghcr.io/daemonless/nextcloud:latest
Observed behavior

2026/05/21 07:21:05 [emerg] 10436#101175: initgroups(bsd, 1000) failed (78: Function not implemented)
2026/05/21 07:21:05 [emerg] 10437#534822: initgroups(bsd, 1000) failed (78: Function not implemented)
connect() to unix:/var/run/php-fpm/php-fpm.sock failed (2: No such file or directory)
Not installed
Root cause

This is the same underlying issue as daemonless/immich-postgres#2 — the base image was built with FREEBSD_MAJOR=15 and contains binaries that call Linux-specific or FreeBSD-15-only syscalls not available on FreeBSD 14.

Specifically, nginx's initgroups() call fails with errno 78 (Function not implemented) inside the jail. This prevents nginx and php-fpm from starting, making Nextcloud completely unusable on FreeBSD 14.4.

io.daemonless.base: nginx
org.opencontainers.image.created: 2026-05-18T12:45:28Z
FREEBSD_MAJOR=15 (in build layers)
What was confirmed working

✓ Container starts and s6 init completes successfully
✓ Nextcloud PHP configuration is generated correctly (/config, /data volumes)
✓ jail params set correctly: allow.mlock=true, allow.suser=true
✗ nginx and php-fpm both fail immediately with initgroups() errno 78
Reference

The fix applied in daemonless/base@ce1ca6a (using setgroups@FBSD_1.0 on FreeBSD 15+) resolved the immich-postgres issue. The same fix needs to be propagated to the nginx base image used by Nextcloud.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions