How to get the
ruid (real user ID),
euid (effective user ID),
suid (saved user ID) and
rgid (real group ID),
egid (effective group ID),
sgid (saved group ID) of a process, can it be done using
$ ps -o pid,euid,ruid,suid,egid,rgid,sgid,cmd PID EUID RUID SUID EGID RGID SGID CMD 28793 1000 1000 1000 1000 1000 1000 -/bin/bash ...
STANDARD FORMAT SPECIFIERS in the man page:
euid EUID effective user ID (alias uid). euser EUSER effective user name. This will be the textual user ID, if it can be obtained and the field width permits, or a decimal representation otherwise.
svgid instead of
sgid and the one that comes with macOS only knows
gid for the effective UID and GID (not
On Linux, there's also the filesystem access UID and GID though it's probably not used much (see
setfsuid(2)). The specifiers for those are
/proc/$pid/status also contains them, see