[Typo3-dev] calculation and display of filepermissions in filelist

Peter Niederlag niederlag at ikd01.de
Sun Jun 20 20:22:13 CEST 2004


Hi Wolfgang,

WK schrieb am 20.06.2004 um 18:55 Uhr CEST

> 
>  *hiya!*
> 
>  On Sun, 20 Jun 2004, Peter Niederlag wrote the following:
> > getmyuid() afaik returns the owner of the script that is currently
> > running. If you get root's value the script probably is owned by
> > root.;)
> 
>  Apache normally starts as root and launches child processes with the
>  uid you specify in the apache conf (User =) on Unix. (afaik) ;-)
> 
>  So there's at least one process owned by root,
>  but I don't know what impact that has on getmyuid().
>  (I'm not an Apache guru)

That is right but...

... as far as I have tried getmyuid() always gets the owner of the
scipt that currently is running. I does not take into consideration the
uid of the apache process whatsoever.

put in some php-file owned by user 1033. call it and getmyuid() will
report 1033, do a chown on the script to uid 1055. getmyuid() will
report 1055 while the apache-process of course has not changed
ownership.

I might be wrong, I only had a quick glance. ;(

BTW: getmygid() is even funnier, because it will report the gid of the
owner of the script

Cheers,
Peter
-- 
Peter Niederlag
*** aktuell: Seminare zu Typo3 ***
http://typo3.naw.de






More information about the TYPO3-dev mailing list