<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1">
<TITLE>Apache suExec and /usr/local/nagios/etc permissions</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hello,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I am running Apache 1.3.20 on RedHat 7.2.</FONT>
<BR><FONT SIZE=2 FACE="Arial">Apache runs under user 'apache'.</FONT>
<BR><FONT SIZE=2 FACE="Arial">Nagios is running under user 'nagios'.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">However, unless I do not give world readable permissions to /usr/local/nagios/etc I cannot access the web interface for Nagios.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">If I give world readable permission to /usr/local/nagios/etc, then users on the system can view the SNMP RO community in the services.cfg or checkcommands.cfg file.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">So, how do I go about not allowing my users to be able to read the /usr/local/nagios/etc directory?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I had disabled suExec on the httpd server for Cricket to run, but I am willing to give up cricket and enable suEexec.</FONT>
<BR><FONT SIZE=2 FACE="Arial">Reading the Apache suExec documentation, it looks like suExec works with v2.0 of Apache and the virtual host directive, neither of which I am using.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Also, it seems that suExec will work if you append the ~ but when I set an alias as /~nagios /usr/local/nagios/share I get permission denied reading ~nagios/etc/htpasswd file.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">(Which means suExec is not working?)</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">Paste from httpd.conf:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"> ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin/</FONT>
<BR><FONT SIZE=2 FACE="Arial"> <Directory "/usr/local/nagios/sbin/"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> AllowOverride AuthConfig</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Options ExecCGI</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Order allow,deny</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Allow from all</FONT>
<BR><FONT SIZE=2 FACE="Arial"> </Directory></FONT>
<BR><FONT SIZE=2 FACE="Arial"> Alias /nagios/ /usr/local/nagios/share/</FONT>
<BR><FONT SIZE=2 FACE="Arial"> <Directory "/usr/local/nagios/share/"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> AllowOverride AuthConfig</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Options None</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Order allow,deny</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Allow from all</FONT>
<BR><FONT SIZE=2 FACE="Arial"> </Directory></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I also tried:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial"> Alias /~nagios/ /usr/local/nagios/share/</FONT>
<BR><FONT SIZE=2 FACE="Arial"> <Directory "/usr/local/nagios/share/"></FONT>
<BR><FONT SIZE=2 FACE="Arial"> AllowOverride AuthConfig</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Options None</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Order allow,deny</FONT>
<BR><FONT SIZE=2 FACE="Arial"> Allow from all</FONT>
<BR><FONT SIZE=2 FACE="Arial"> </Directory></FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Thank you…</FONT>
</P>
<BR>
</BODY>
</HTML>