ppriv(1) on Solnix vs Linux and the BSDs
ppriv is the illumos tool at /usr/bin/ppriv for inspecting and changing the privilege sets (A, E, I, L, P) of a command, a running process or a core file. Linux capsh and setpriv act on Linux capabilities of a process they are about to exec, and FreeBSD mdo only changes user and group IDs, so none of them maps flag-for-flag.
The manual pages
- Solnix: ppriv(1) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: capsh(1) libcap-2.77 (different command, similar job)
- Linux: setpriv(1) util-linux-2.42.3 (different command, similar job)
- FreeBSD: mdo(1) 15.1-RELEASE (different command, similar job)
What Solnix runs
A default Solnix system runs the illumos ppriv at /usr/bin/ppriv. No other variants are shipped. The OpenBSD and NetBSD counterparts are not in the bundle, so nothing is compared for them.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| Linux | privilege model | Solnix ppriv works on the E, I, L and P privilege sets, named by privilege (letters AEILP). Linux capsh and setpriv work on capability sets: effective, permitted, inheritable, ambient and bounding. Source: Solnix ppriv(1) OPTIONS -s; Linux capsh(1) --caps, --drop, --inh; Linux setpriv(1) --inh-caps, --ambient-caps, --bounding-set |
| FreeBSD | what is changed | FreeBSD mdo changes only process credentials (real, effective and saved user and group IDs, plus supplementary groups) via setcred(2). The mdo page documents no privilege sets. ppriv changes privilege sets and documents no uid or gid options. Source: FreeBSD mdo(1) DESCRIPTION; Solnix ppriv(1) OPTIONS |
| Linux, FreeBSD | inspecting other processes | ppriv [-v] [-S] [pid | core]... examines or changes running processes and core files. The setpriv and mdo pages describe only running a program with new settings (setpriv --dump shows the current privilege state). Neither describes a pid argument.Source: Solnix ppriv(1) SYNOPSIS, DESCRIPTION; Linux setpriv(1) -d, --dump; FreeBSD mdo(1) SYNOPSIS |
| Linux, FreeBSD | running a command | Solnix needs -e before the command: ppriv -e [options] command [arg]... setpriv takes program [arguments] directly. mdo runs $SHELL, or /bin/sh, when no command is given. capsh runs /bin/bash after --.Source: Solnix ppriv(1) SYNOPSIS, -e; Linux setpriv(1) SYNOPSIS; FreeBSD mdo(1) DESCRIPTION; Linux capsh(1) -- |
| Linux | set specification syntax | Solnix -s takes [AEILP][+-=]privsetspec with no spaces; = assigns the set. setpriv takes +cap/-cap lists per set option. capsh --caps takes a text capability set, and --drop removes from the bounding set.Source: Solnix ppriv(1) -s; Linux setpriv(1) --inh-caps; Linux capsh(1) --caps, --drop |
| Linux | limits on changes when running a command | With ppriv -e, only L and I can be modified, and privileges can only be removed, because ppriv starts with P=E=I. On Linux, setpriv can add to the inheritable set if the bounding set holds the capability. Additions to the bounding set are not permitted.Source: Solnix ppriv(1) USAGE; Linux setpriv(1) --inh-caps, --bounding-set |
| Linux, FreeBSD | who may use it | To control another process, the ppriv effective set must be a superset of the target's E, I and P. If the uids differ, {PRIV_PROC_OWNER} is needed. mdo needs the superuser or a MAC module such as mac_do(4). capsh --drop needs CAP_SETPCAP.Source: Solnix ppriv(1) USAGE; FreeBSD mdo(1) DESCRIPTION; Linux capsh(1) --drop |
| Linux, FreeBSD | privilege debugging | Solnix has -D and -N to turn privilege debugging on or off for a command or process. The setpriv and mdo pages in the bundle document no equivalent option. The capsh text is cut off in the bundle.Source: Solnix ppriv(1) -D, -N; Linux setpriv(1) OPTIONS; FreeBSD mdo(1) OPTIONS |
| Linux | listing privileges | ppriv -l [-v] [privilege-specification]... lists the defined privileges and details about named privileges or specifications. setpriv --list-caps lists all known capabilities and must be given alone.Source: Solnix ppriv(1) -l, SYNOPSIS; Linux setpriv(1) --list-caps |
| Linux | no_new_privs | setpriv --nnp sets no_new_privs so that exec does not grant new privileges. The Solnix ppriv page documents no such flag. It documents -M for Trusted Extensions (NET_MAC_AWARE attributes).Source: Linux setpriv(1) --nnp; Solnix ppriv(1) -M |
| Linux, FreeBSD | exit status | ppriv documents only 0 for success and non-zero for an error. capsh -+ and =+ exit with the child's status (1 if killed by a signal), and capsh --inmode exits 1 on mismatch. The mdo page has no exit status section.Source: Solnix ppriv(1) EXIT STATUS; Linux capsh(1) -+, =+, --inmode; FreeBSD mdo(1) |
| Linux, FreeBSD | interface stability | On Solnix the ppriv invocation is Committed and its output is Uncommitted, so parse output with care. The Linux and FreeBSD pages in the bundle make no such statement. Source: Solnix ppriv(1) ATTRIBUTES; Linux setpriv(1); FreeBSD mdo(1) |
Everyday tasks
| Task | Solnix | Linux | FreeBSD |
|---|---|---|---|
| run a command with fewer privileges | ppriv -e -s spec command | setpriv --inh-caps -cap program; capsh --drop=cap-list -- -c 'command' | — |
| show privileges of a process | ppriv [-v] pid | setpriv --dump; capsh --print (current process) | — |
| list defined privileges | ppriv -l [-v] | setpriv --list-caps | — |
| run a command with different user or group IDs | — | setpriv --reuid uid --regid gid ...; capsh --user=username | mdo -u user command |
| turn on privilege debugging for a command | ppriv -D -e command | — | — |
Standards
- POSIX: ppriv is not a POSIX.1-2024 utility.
- Solnix: Interface Stability: the invocation is Committed; the output is Uncommitted.
Writing portable scripts
- Do not expect one script to span these tools: Solnix privilege sets, Linux capabilities and FreeBSD credentials are different models. Branch on the tool present (ppriv, setpriv/capsh, mdo).
- Do not parse ppriv output in scripts that must survive upgrades: its output is Uncommitted, while the invocation is Committed.
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.