http://www.perlmonks.org?node_id=204781

belize has asked for the wisdom of the Perl Monks concerning the following question:

We are writing a CGI that runs through SSL and takes in confidential info from a form. We want to take the results from the form, and write it to a text file that is created and named by the time/date to a password protected directory, so we can then retrieve the file by entering our username and password.

Everything works great except - the only problem we now have is that the cgi can not create or write a file to the password protected directory (the directory is chmod 777, but requires authorization when the cgi tries to write to it). Is there a way to do this within the cgi?