in reply to .htaccess and cgi

The $< variable holds the real user ID of the process and the $> holds the effective UID. If you want to know the user id for a script you're writing, use those variables.

I think this is an XYZ Question... perhaps you could tell us what you're trying to accomplish in general?