table of contents
RUNASPCP(1) | General Commands Manual | RUNASPCP(1) |
NAME¶
runaspcp - execute a shell command as the user ``pcp''
SYNOPSIS¶
$PCP_BINADM_DIR/runaspcp [-s shell] command
DESCRIPTION¶
runaspcp runs the single argument command as the user $PCP_USER and group $PCP_GROUP (both from /etc/pcp.conf).
The command is run by sh(1) by default, else shell from the -s (or --shell) command line argument.
Normally runaspcp is used from the PCP ``init'' scripts that are launched as ``root'' but need to downgrade their privileges when running some PCP daemons as the ``pcp'' user. runaspcp provides a portable solution for platforms where neither setpriv(1) nor runuser(1) is available, although these alternates will be used in preference to runaspcp if they are installed.
The -?, --help option displays a usage message.
DIAGNOSTICS¶
The exit status is 1 if runaspcp cannot change user or group, or cannot execute the shell, else the exit status of command.
SEE ALSO¶
runuser(1), setpriv(1) and sh(1).
PCP | Performance Co-Pilot |