chmod(1) on Solnix vs Linux and the BSDs
On Solnix, chmod is the illumos /usr/bin/chmod. Its synopsis has only -f, -R and -@. It has no -h, -H, -L, -P or -v, so scripts that use those flags on Linux or the BSDs will fail. It also edits ACLs and system attributes.
The manual pages
- Solnix: chmod(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: chmod(1) coreutils-full-9.11
- FreeBSD: chmod(1) 15.1-RELEASE
- OpenBSD: chmod(1) 8.0
- NetBSD: chmod(1) 11.0
- Standard: POSIX.1-2024 (IEEE Std 1003.1-2024),
chmod
What Solnix runs
A default Solnix system runs the illumos chmod at /usr/bin/chmod. No other variants are shipped. It is not GNU chmod, so GNU-only options such as --reference, -c and --preserve-root are not in the Solnix page.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | symlink options -h, -H, -L, -P | The Solnix synopsis is chmod [-fR] and lists none of -h, -H, -L or -P. Linux and all three BSDs document them. The Solnix page does not say how -R treats symbolic links.Source: Solnix chmod(1) SYNOPSIS; Linux chmod(1) -H, -L, -P, -h; FreeBSD chmod(1) -H, -L, -P, -h; OpenBSD chmod(1) -H, -L, -P, -h; NetBSD chmod(1) -H, -L, -P, -h |
| Linux, FreeBSD | -v verbose | Solnix chmod has no -v. Linux has -v and -c (report only changes). FreeBSD has -v, and repeating it prints old and new modes. FreeBSD marks -v as non-standard and not recommended in scripts.Source: Solnix chmod(1) SYNOPSIS; Linux chmod(1) -v, -c; FreeBSD chmod(1) -v, COMPATIBILITY |
| Linux, NetBSD | --reference | Solnix has no --reference to copy the mode from another file. Linux and NetBSD both have --reference=rfile. FreeBSD and OpenBSD do not list it.Source: Solnix chmod(1) SYNOPSIS; Linux chmod(1) --reference; NetBSD chmod(1) SYNOPSIS, --reference |
| all four | ACLs and system attributes | Solnix chmod also modifies ACLs (acl_operation) and boolean read-write system attributes through -@ named_attribute. The Linux and BSD chmod pages describe only mode bits. FreeBSD's SEE ALSO points to setfacl(1) and chflags(1) instead.Source: Solnix chmod(1) SYNOPSIS, DESCRIPTION; Linux chmod(1) DESCRIPTION; FreeBSD chmod(1) SEE ALSO; OpenBSD chmod(1) SEE ALSO; NetBSD chmod(1) SEE ALSO |
| all four | setgid on directories | On Solnix, the set-group-ID bit of a directory cannot be set or cleared in absolute mode. You must use symbolic g+s or g-s. The other pages document no such restriction on absolute modes. Source: Solnix chmod(1) Absolute Mode; Linux chmod(1) numeric mode; OpenBSD chmod(1) Absolute modes |
| all four | mandatory locking (l) | Solnix has an l permission letter for mandatory locking. In absolute mode, 20#0 enables locking when # is 6, 4, 2 or 0. Setting g+s together with +l is an error. The other pages list no l and give 2000 as set-group-ID only. Source: Solnix chmod(1) Absolute Mode (20#0), Symbolic Mode permission l; Linux chmod(1) rwxXst; OpenBSD chmod(1) perm symbols and 2000 |
| all four | sticky bit on non-directories | On Solnix, only the super-user can set the sticky bit on a non-directory file. The Linux and BSD pages in the bundle do not state this restriction. Source: Solnix chmod(1) Symbolic Mode (sticky bit restriction); Linux chmod(1); FreeBSD chmod(1); OpenBSD chmod(1); NetBSD chmod(1) |
| Linux | recursive symlink default | GNU chmod documents -H as the default for -R and ignores symlinks met during traversal. The Solnix page, as shown in the bundle, gives no -H, -L or -P and states no symlink behaviour for -R.Source: Linux chmod(1) OPTIONS (-H is the default), DESCRIPTION; Solnix chmod(1) SYNOPSIS |
| FreeBSD, OpenBSD, NetBSD | BSD default is -P | FreeBSD and NetBSD default to -P under -R. OpenBSD follows no symlinks when none of -H, -L, -P is given. The Solnix page does not document these options.Source: FreeBSD chmod(1) -P; NetBSD chmod(1) DESCRIPTION; OpenBSD chmod(1) DESCRIPTION; Solnix chmod(1) SYNOPSIS |
| OpenBSD | -f and -h with -R | OpenBSD chmod has no -f; its synopsis is [-h] [-R [-H | -L | -P]]. Solnix, Linux, FreeBSD and NetBSD accept -f. On OpenBSD, -h and -R are mutually exclusive.Source: OpenBSD chmod(1) SYNOPSIS, -h; Solnix chmod(1) SYNOPSIS; FreeBSD chmod(1) -f; NetBSD chmod(1) -f |
| FreeBSD, NetBSD | -f and exit status | FreeBSD and NetBSD -f suppresses the diagnostic and also stops chmod from reflecting the failure in the exit status. Linux describes -f only as suppressing most error messages. The bundle's Solnix text does not describe -f.Source: FreeBSD chmod(1) -f; NetBSD chmod(1) -f; Linux chmod(1) -f |
| NetBSD | -d | NetBSD -d skips files whose mode is already as requested. Solnix has no -d.Source: NetBSD chmod(1) -d; Solnix chmod(1) SYNOPSIS |
Standards
- POSIX: chmod is a POSIX.1-2024 utility.
- FreeBSD: chmod is expected to be IEEE Std 1003.2 (“POSIX.2”) compatible, except for the perm symbol “t”, which is not in that standard.
-vis non-standard. - OpenBSD: chmod is compliant with the specification. The flags [
-HhLP] are extensions to it. The “t” perm symbol is marked as an X/Open System Interfaces option. - NetBSD: chmod is expected to be IEEE Std 1003.2-1992 (“POSIX.2”) compatible, except for the perm symbol “t”.
Writing portable scripts
- Use only
-Rand-fwith octal or symbolic modes in portable scripts. Avoid-h,-H,-L,-P,-v,-c,-dand--reference, which are missing on at least one system. OpenBSD also lacks-f. - To set setgid on a directory portably, use symbolic g+s rather than an octal mode. Solnix does not allow setting it in absolute mode.
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.