|
|
|
|
4.1.3. Process attributes
A process has a series of characteristics, which can be viewed
with the ps command:
-
The process ID or PID: a unique identification number used to
refer to the process.
-
The parent process ID or PPID: the number of the process (PID)
that started this process.
-
Nice number: the degree of friendliness of this process toward
other processes (not to be confused with process priority, which is
calculated based on this nice number and recent CPU usage of the
process).
-
Terminal or TTY: terminal to which the process is connected.
-
User name of the real and effective user (RUID and EUID): the
owner of the process. The real owner is the user issuing the
command, the effective user is the one determining access to system
resources. RUID and EUID are usually the same, and the process has
the same access rights the issuing user would have. An example to
clarify this: the browser mozilla in
/usr/bin is owned by user
root:
theo:~> ls -l /usr/bin/mozilla
-rwxr-xr-x 1 root root 4996 Nov 20 18:28 /usr/bin/mozilla*
theo:~> mozilla &
[1] 26595
theo:~> ps -af
UID PID PPID C STIME TTY TIME CMD
theo 26601 26599 0 15:04 pts/5 00:00:00 /usr/lib/mozilla/mozilla-bin
theo 26613 26569 0 15:04 pts/5 00:00:00 ps -af
|
When user theo starts this program, the process itself
and all processes started by the initial process, will be owned by
user theo and not by the system administrator. When
mozilla needs access to certain files, that
access will be determined by theo's permissions and not by
root's.
-
Real and effective group owner (RGID and EGID): The real group
owner of a process is the primary group of the user who started the
process. The effective group owner is usually the same, except when
SGID access mode has been applied to a file.
|
|
|