Re: NFS + nobody user? (was: Re: poudriere + ZFS + NFS -> chown: /usr/local/poudriere/data/.m/rpi5-freebsd143-custom/01/.npkg: Operation not permitted)

From: Rick Macklem <rick.macklem_at_gmail.com>
Date: Thu, 30 Oct 2025 13:52:52 UTC
On Thu, Oct 30, 2025 at 3:00 AM Ronald Klop <ronald-lists@klop.ws> wrote:
>
> Hi,
>
> What is special about the nobody (65534) user in NFS?
It's defined as nobody in /etc/passwd for a default install and
in /usr/src/sys/sys/conf.h as UID_NOBODY.

In NFS it means "unknown user" and is given world permissions
only.

There is also nogroup, which appears to be defined as GID_NOGROUP 65533
in sys/conf.h and as NOGROUP 65535 in sys/param.h, just to make things
confusing/interesting. Best to avoid both these group #s.

rick

> I couldn't find anything in the documentation that prohibits this uid to be used. But I get errors when I do chown 65534, but not with chown 65533 or 65535.
>
> Ronald.
>
>
>
> Van: Ronald Klop <ronald-lists@klop.ws>
> Datum: dinsdag, 28 oktober 2025 16:57
> Aan: ports@freebsd.org
> Onderwerp: Re: poudriere + ZFS + NFS -> chown: /usr/local/poudriere/data/.m/rpi5-freebsd143-custom/01/.npkg: Operation not permitted
>
> I resolved this by telling poudriere to use another user for the build.
>
> So my poudriere.conf now contains PORTBUILD_USER=builduser.
> And builduser is defined with uid 65532.
>
> Regards,
> Ronald.
>
>
>
> Van: Ronald Klop <ronald-lists@klop.ws>
> Datum: dinsdag, 28 oktober 2025 15:26
> Aan: ports@freebsd.org
> Onderwerp: poudriere + ZFS + NFS -> chown: /usr/local/poudriere/data/.m/rpi5-freebsd143-custom/01/.npkg: Operation not permitted
>
> Hi,
>
> I have the following setup of jails with poudriere running in Jenkins:
>
> pkg jail: running lighttpd exporting the poudriere UI. This jail NFS exports /usr/local/poudriere/data/logs/bulk and /usr/local/poudriere/data/packages.
>
> poudriere jail 1: running poudriere+ZFS and it NFS mounts /usr/local/poudriere/data/logs/bulk and /usr/local/poudriere/data/packages from the pkg jail.
> poudriere jail 1: running poudriere (no ZFS) and it NFS mounts /usr/local/poudriere/data/logs/bulk and /usr/local/poudriere/data/packages from the pkg jail.
>
> The mounts work, I can access the files on the command line.
>
> But on the pourdriere with ZFS at the end of the first build I get this error:
>
> [00:01:32] ====> Compressing man pages (compress-man)
> [00:01:32] ===>   Installing ldconfig configuration file
> [00:01:32] ===========================================================================
> [00:01:32] chown: /usr/local/poudriere/data/.m/rpi5-freebsd143-custom/01/.npkg: Operation not permitted
> [00:01:32] =======================<phase: package        >============================
> [00:01:32] ===== env: 'PKG_NOTES=build_timestamp ports_top_git_hash ports_top_checkout_unclean port_checkout_unclean built_by' 'PKG_NOTE_build_timestamp=2025-10-28T13:33:27+00:00' 'PKG_NOTE_ports_top_git_hash=d72ccf55aa06' 'PKG_NOTE_ports_top_checkout_unclean=no' 'PKG_NOTE_port_checkout_unclean=no' 'PKG_NOTE_built_by=poudriere-git-3.4.99.20251006' NO_DEPENDS=yes USER=nobody UID=65534 GID=65534
> [00:01:32] ===>  Building packages for pkg-2.3.1
> [00:01:32] mkdir: /.npkg/All: Permission denied
> [00:01:32] *** Error code 1
>
>
> Any idea why this happens?
> This directory is not NFS mounted, so why would it give an error here?
>
> Regards,
> Ronald.
>
>
>
>
>
>