chgrp(1) on Solnix vs Linux and the BSDs
On a default Solnix system chgrp is the illumos /usr/bin/chgrp. It has no -v, no --reference and no -c, which Linux and the BSDs provide, and it adds -s to set a group by Windows SID.
The manual pages
- Solnix: chgrp(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: chgrp(1) coreutils-full-9.11
- FreeBSD: chgrp(1) 15.1-RELEASE
- OpenBSD: chgrp(1) 8.0
- NetBSD: chgrp(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
chgrp
What Solnix runs
/usr/bin/chgrp is the illumos chgrp. /usr/xpg4/bin/chgrp is also shipped. The Solnix page says the two once behaved differently and now behave the same way.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux, FreeBSD, NetBSD | -v verbose | Solnix chgrp has no -v. Linux, FreeBSD and NetBSD accept -v to report each file processed. FreeBSD marks -v as non-standard and not recommended in scripts. OpenBSD has no -v either.Source: Solnix chgrp(1) OPTIONS; Linux chgrp(1) -v; FreeBSD chgrp(1) -v, COMPATIBILITY; NetBSD chgrp(1) -v |
| Linux | -c and --reference | Solnix chgrp has no -c (report only changes) and no --reference=RFILE. Linux has both. A Linux script copying the group from a reference file fails on Solnix.Source: Linux chgrp(1) -c, --reference; Solnix chgrp(1) SYNOPSIS |
| NetBSD | --reference and -d | NetBSD chgrp accepts --reference=rfile and -d (skip the update if the group is already the desired value). Solnix has neither.Source: NetBSD chgrp(1) SYNOPSIS, -d; Solnix chgrp(1) SYNOPSIS |
| all four | -s Windows SID | Solnix -s treats the group operand as a Windows SID and needs a file system that stores SIDs, such as ZFS. None of the counterpart pages document -s.Source: Solnix chgrp(1) -s, SYNOPSIS; Linux, FreeBSD, OpenBSD, NetBSD chgrp(1) OPTIONS |
| FreeBSD | -x mount points | FreeBSD -x stops traversal at file system mount points, and the page calls it non-standard. Solnix chgrp has no -x.Source: FreeBSD chgrp(1) -x, COMPATIBILITY; Solnix chgrp(1) SYNOPSIS |
| OpenBSD | -h with -R, and -f | OpenBSD says -h and -R are mutually exclusive, and it has no -f. Solnix accepts -f and -h and -R together in its synopsis, and -f suppresses error reports.Source: OpenBSD chgrp(1) SYNOPSIS, -h; Solnix chgrp(1) SYNOPSIS, -f |
| all four | -H/-L/-P without -R | Solnix describes -H, -L and -P as acting on symbolic links given on the command line even though -R is the recursion option, and the last of them wins. Linux, FreeBSD, OpenBSD and NetBSD say they take effect only with -R. For Solnix the manual says -R defaults to -P.Source: Solnix chgrp(1) -H, -L, -P, -R; Linux chgrp(1) DESCRIPTION; FreeBSD chgrp(1); OpenBSD chgrp(1); NetBSD chgrp(1) |
| all four | symlink default without -h | Solnix without -h changes the group of the file a symlink references. Linux calls this the default (--dereference). NetBSD says chgrp on a symlink without -h has no effect and succeeds unless -H or -L is set.Source: Solnix chgrp(1) -h; Linux chgrp(1) --dereference; NetBSD chgrp(1) DESCRIPTION |
| NetBSD | numeric group names | NetBSD looks up the group name first and lets you force a number with a leading #. Solnix uses the numeric ID if the number is found in the group database as a name, and does not document #. Source: NetBSD chgrp(1) group operand, STANDARDS; Solnix chgrp(1) OPERANDS |
| all four | ownership restriction | Solnix documents _POSIX_CHOWN_RESTRICTED, on by default and controlled by set rstchown in /etc/system. Without privilege, the owner can change the group only to one they belong to. The BSD pages state the same rule without the setting. The Linux page is silent.Source: Solnix chgrp(1) DESCRIPTION; FreeBSD, OpenBSD, NetBSD chgrp(1); Linux chgrp(1) |
Standards
- POSIX: chgrp is a POSIX.1-2024 utility.
- Solnix: Interface Stability: Committed. Standard: see standards(7). CSI-enabled except for the group name.
- FreeBSD: Expected to be IEEE Std 1003.2 (“POSIX.2”) compatible.
-vand-xare non-standard. - OpenBSD: The chgrp utility is compliant with the specification.
- NetBSD: Expected to be POSIX 1003.2 compatible.
-v,-dand the use of # to force a numeric group ID are extensions to IEEE Std 1003.2 (“POSIX.2”).
Writing portable scripts
- Use only chgrp [
-fhR] [-H|-L|-P] group file. Avoid-v,-c,-d,-x,-sand--reference; they are missing on at least one system. - Do not combine
-hwith-R; OpenBSD documents them as mutually exclusive.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.