diff -Nur suphp-0.6.2.orig/src/Application.cpp suphp-0.6.2/src/Application.cpp
--- suphp-0.6.2.orig/src/Application.cpp	2007-10-02 15:12:29.000000000 -0500
+++ suphp-0.6.2/src/Application.cpp	2007-10-02 15:33:14.000000000 -0500
@@ -342,7 +342,7 @@
     // Paranoid mode only
 
 #ifdef OPT_USERGROUP_PARANOID
-    if (targetUser != scriptFile.getUser()) {
+    if (config.getParanoidUIDCheck() && targetUser != scriptFile.getUser()) {
 	std::string error ="Mismatch between target UID ("
 	    + Util::intToStr(targetUser.getUid()) + ") and UID (" 
 	    + Util::intToStr(scriptFile.getUser().getUid()) + ") of file \"" 
@@ -351,7 +351,7 @@
 	throw SoftException(error, __FILE__, __LINE__);
     }
 
-    if (targetGroup != scriptFile.getGroup()) {
+    if (config.getParanoidGIDCheck() && targetGroup != scriptFile.getGroup()) {
 	std::string error ="Mismatch between target GID ("
 	    + Util::intToStr(targetGroup.getGid()) + ") and GID (" 
 	    + Util::intToStr(scriptFile.getGroup().getGid()) + ") of file \"" 
diff -Nur suphp-0.6.2.orig/src/Configuration.cpp suphp-0.6.2/src/Configuration.cpp
--- suphp-0.6.2.orig/src/Configuration.cpp	2007-10-02 15:12:29.000000000 -0500
+++ suphp-0.6.2/src/Configuration.cpp	2007-10-02 15:26:09.000000000 -0500
@@ -112,6 +112,8 @@
 #endif
     this->umask = 0077;
     this->chroot_path = "";
+    this->paranoid_uid_check = true;
+    this->paranoid_gid_check = true;
 }
 
 void suPHP::Configuration::readFromFile(File& file) 
@@ -157,6 +159,10 @@
 		this->umask = Util::octalStrToInt(value);
 	    else if (key == "chroot")
 		this->chroot_path = value;
+	    else if (key == "paranoid_gid_check")
+		this->paranoid_gid_check = this->strToBool(value);
+	    else if (key == "paranoid_uid_check")
+		this->paranoid_uid_check = this->strToBool(value);
 	    else 
 		throw ParsingException("Unknown option \"" + key + 
 				       "\" in section [global]", 
@@ -217,6 +223,14 @@
     return this->allow_directory_others_writeable;
 }
 
+bool suPHP::Configuration::getParanoidUIDCheck() const {
+    return this->paranoid_uid_check;
+}
+
+bool suPHP::Configuration::getParanoidGIDCheck() const {
+    return this->paranoid_gid_check;
+}
+
 bool suPHP::Configuration::getErrorsToBrowser() const {
     return this->errors_to_browser;
 }
diff -Nur suphp-0.6.2.orig/src/Configuration.hpp suphp-0.6.2/src/Configuration.hpp
--- suphp-0.6.2.orig/src/Configuration.hpp	2007-10-02 15:12:29.000000000 -0500
+++ suphp-0.6.2/src/Configuration.hpp	2007-10-02 15:29:01.000000000 -0500
@@ -44,6 +44,8 @@
 	std::string logfile;
 	std::string webserver_user;
 	std::string docroot;
+    bool paranoid_uid_check;
+    bool paranoid_gid_check;
 	bool allow_file_group_writeable;
 	bool allow_directory_group_writeable;
 	bool allow_file_others_writeable;
@@ -131,6 +133,18 @@
 	bool getAllowDirectoryOthersWriteable() const;
 
 	/**
+	 * Returns whether suPHP should check the target script GID in
+     * paranoid mode
+	 */
+	bool getParanoidGIDCheck() const;
+	
+	/**
+	 * Returns whether suPHP should check the target script UID in
+     * paranoid mode
+	 */
+	bool getParanoidUIDCheck() const;
+	
+	/**
 	 * Returns whether (minor) error message should be sent to browser
 	 */
 	bool getErrorsToBrowser() const;
