paths and permissions

Gyepi SAM gyepi at praxis-sw.com
Fri Feb 27 20:54:11 CET 2004


On Fri, Feb 27, 2004 at 11:25:25AM -0500, David Relson wrote:
>    uid=1013(linda) gid=502(users) euid=0(root) egid=12(mail)  groups=502(users)

According to my copy of the late W. Richard Steven's _Advanced Programming in
the Unix Environment_, which I cannot recommend enough to all Unix
programmers:

  Every process has six or more IDs associated with it:

  real user ID, real group ID
  effective user ID, effective group ID
  saved-set-user-ID, saved-set-group-ID

  Most of the time, all those values are equal to the user running the process.
  If a file is setuid, then the effective user ID is set to the owner of the
  file. If the file is setgid then the effective group ID is set to the group
  owner of the file.

  The effective ID of a process determines its file access permissions

The explanation then falls out. procmail is setuid root and
execs subprocesses with the effective user ID set to root, which is why all
users can write to the global database.

A grep of the procmail-3.22 source shows that it only changes the real user
ID, not the effective user id.

-Gyepi




More information about the Bogofilter mailing list