I'm developing a web app that takes a bunch of parameters (dropdown boxes, etc) from an authenticated user, creates a file, then delivers that file via stdin to a program on my web server. 

Due to some limitations of the server-side program, I'd like to have Apache run that server-side program as the previously authenticated user rather than as the generic apache user.

So for example, if user foo logs in (using mod\_authz\_ldap on the backend), and fills out the form, the form should then execute the command on the server as user foo rather than user apache.

Is this possible?