Do you want the UNIX userid the process is running under or the
authenticated name the web client used to gain access? The first should
be easily got through what ever programming language you're using (all
have a way to determine what uid they're running as, both real and
effective). The second should be available in the env variable
REMOTE_USER. (Note, these may very likely be different.)
You might also find this link helpful:
http://www.apache.org/docs/misc/FAQ.html#remote-user-var
-adam
> Hi all,
> I have just created some secure directories on a website using htaccess. Now
> when i start a CGI from one of those dirs i need to know who is actually
> accessing this directory, i.e. i want to know the userid of the one who
> actually has gained access to the site. Isn't there any environment variable
> that displays this ? Strangely enough, when i run a CGI that shows me the
> available variables, the username is nowhere to be found, or should i
> protect the CGI directory as well to get this ?
> Thanks
> Bob Lefevere