--- nagiosql-3.0.3.orig/debian/patches/30_nagios3_configs_readonly.dpatch
+++ nagiosql-3.0.3/debian/patches/30_nagios3_configs_readonly.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30_nagios3_configs_readonly.dpatch by  <wob@swobspace.eli.st-elisabeth.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad nagiosql-3.0.3~/nagiosql3/admin/domain.php nagiosql-3.0.3/nagiosql3/admin/domain.php
+--- nagiosql-3.0.3~/nagiosql3/admin/domain.php	2009-04-28 15:02:27.000000000 +0200
++++ nagiosql-3.0.3/nagiosql3/admin/domain.php	2009-06-14 14:18:09.000000000 +0200
+@@ -154,11 +154,11 @@
+   }
+   // Nagios base configuration files
+   if (isset($chkInsNagiosBaseDir)) {
+-    if (! is_writable($chkInsNagiosBaseDir."nagios.cfg")) {
++    if (! is_readable($chkInsNagiosBaseDir."nagios.cfg")) {
+       $permissionerror .= $chkInsNagiosBaseDir."nagios.cfg ".gettext("is not writeable")."<br>";
+       $isanerror=1;
+     }
+-    if (! is_writable($chkInsNagiosBaseDir."cgi.cfg")) {
++    if (! is_readable($chkInsNagiosBaseDir."cgi.cfg")) {
+       $permissionerror .= $chkInsNagiosBaseDir."cgi.cfg ".gettext("is not writeable")."<br>";
+       $isanerror=1;
+     }
+@@ -411,4 +411,4 @@
+ $maintp->setVariable("VERSION_INFO","<a href='http://www.nagiosql.org' target='_blank'>NagiosQL</a> - Version: $setFileVersion");
+ $maintp->parse("footer");
+ $maintp->show("footer");
+-?>
+\ No newline at end of file
++?>
