php logname ???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ron Croonenberg

    php logname ???

    Hello,

    I have an apache server setup[ that runs under user=apache and group is
    apache too.

    Does someone know why the environment variables (in Php) are set in such
    a way that logname seems to be root ?

    I thought Php "inherited" the environment variables from apache.

    thanks,

    Ron

  • B. Johannessen

    #2
    Re: php logname ???

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Ron Croonenberg wrote:[color=blue]
    > I have an apache server setup[ that runs under user=apache and group is
    > apache too.
    >
    > Does someone know why the environment variables (in Php) are set in such
    > a way that logname seems to be root ?[/color]

    Apache on unix is normally started as root (mostly to be able to bind
    to ports < 1024, such as port 80). Apache then switches user and group
    ids using setgid(2) and setuid(2). For this reason, Apaches initial
    environment is normally inherited from init(8).

    Altering this environment is probably easiest to do from the apache
    startup script.


    Bob

    - --
    | B. Johannessen <bob@db.org> +47 97 15 20 09 - http://db.org/
    | Mail & Spam - News, Drafts & Standards - http://db.org/blog/
    | On The Origin Of Spam; Spam Statistics - http://db.org/spam/
    - --
    -----BEGIN PGP SIGNATURE-----

    iD8DBQFAL4uWooi sUyMOFlgRAnCNAJ 42v1kEFvxwGUpwc/UAV/AFM3jiMACfRwTH
    FvR+j/rK8LNCAWxtx1Eem uU=
    =jTYf
    -----END PGP SIGNATURE-----

    Comment

    Working...