[tpm] Apache permission question

Indy Singh indy at indigostar.com
Tue Oct 6 08:59:51 PDT 2009

Hi All,

I have a Perl CGI script that creates log files, and a second Perl CGI 
script that is used to view and delete the log files.  However the 
second script is not able to delete the files.

The first script is located in the Apache cgi-bin directory, the second 
is located in a subdirectory below htdocs.  This allows the second 
script to be password protected with a .htaccess file.  The 
configuration of this Apache server runs files in the cgi-bin directory 
as cgi scripts and any perl script below htdocs run as mod-perl.  I am 
happy with this aspect of the configuration.

The problem is that the second script does not have permission to delete 
the log files.  I have found that this is because the two scripts run 
under a different used id.  The cgi-bin scirpt runs as me, the second 
script runs as 'Apache'.

Anyone have any ideas on how to resolve this issue. Preferrably without 
mucking around with the Apache configuration.

Indy Singh
IndigoSTAR Software -- www.indigostar.com

More information about the toronto-pm mailing list