Get calling user ID in PHP setuid script

Get calling user ID in PHP setuid script

I have a PHP script on Linux in which the sticky bit is set, so it gets executed as the file owner. How can I get the user id of the calling process, for authorization purposes?

Context: I have two applications on a server, and want one to request some info from the other. For this reason the other offers a script with setuid, but I want to make sure it can only be called by the one.

C++ build systems [closed]


API to translate group name to group id (gid)
You could use one of the posix functions to receive hold of the parent process, for case : ppid.php. What scripts should not be ported from bash to python? From this you must peek into /proc/PROCESSID/ to find hopefully what you seek.. Vim + OmniCppComplete: Completing on Class Members which are STL containers I'm not on a linux machine to test it out although this looks to be possible.. How do I bring a processes window to the foreground on X Windows? (C++)
How communicate with pty via minicom or screen?

84 out of 100 based on 39 user ratings 194 reviews