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.

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 withTopicWhat differs
Linuxprivilege modelSolnix 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
FreeBSDwhat is changedFreeBSD 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, FreeBSDinspecting other processesppriv [-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, FreeBSDrunning a commandSolnix 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) --
Linuxset specification syntaxSolnix -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
Linuxlimits on changes when running a commandWith 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, FreeBSDwho may use itTo 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, FreeBSDprivilege debuggingSolnix 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
Linuxlisting privilegesppriv -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
Linuxno_new_privssetpriv --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, FreeBSDexit statusppriv 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, FreeBSDinterface stabilityOn 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

TaskSolnixLinuxFreeBSD
run a command with fewer privilegesppriv -e -s spec commandsetpriv --inh-caps -cap program; capsh --drop=cap-list -- -c 'command'—
show privileges of a processppriv [-v] pidsetpriv --dump; capsh --print (current process)—
list defined privilegesppriv -l [-v]setpriv --list-caps—
run a command with different user or group IDs—setpriv --reuid uid --regid gid ...; capsh --user=usernamemdo -u user command
turn on privilege debugging for a commandppriv -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.