[Typo3-dev] calculation and display of filepermissions in filelist
Martin T. Kutschker
Martin-no5pam-Kutschker at blackbox.n0spam.net
Wed Jun 23 16:19:19 CEST 2004
Peter Niederlag wrote:
> Hi,
>
> MTK schrieb am 20.06.2004 um 20:50 Uhr CEST
>
>
>>Peter Niederlag wrote:
>>
>>>... 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.
>>
>>I did not try it, but this is in snyc with the manual entry on
>>php.net.
>>
>>It will return the owner of the script. AFAIS it returns the uid
>>result of the stat() of the script!
>>
>>So this is in conformance with your observations on getmypid().
>
>
> But doesn't that completly disqualify getmyuid() to be useful
> in calculation of apache/php being capable of reading/writing a
> particular file?
I'm not sure what the scripts uid/gid will tell you. What you need is
the gid of the process and the uid/gid (among other file
setttings/permissions) of the file in question. IMHO you cannot use
getmyuid() for this task (at leat not in Unix).
On Unix the posix-Extension has all you need (posix_getuid and friends).
I don't know if it is available on Windows.
Masi
More information about the TYPO3-dev
mailing list