+

Added chmod g+rw after repository creation

Benjamin Renard [2013-08-21 16:19:22]
Added chmod g+rw after repository creation
Filename
addrepo/main.php
diff --git a/addrepo/main.php b/addrepo/main.php
index fb4a858..478bba0 100644
--- a/addrepo/main.php
+++ b/addrepo/main.php
@@ -151,6 +151,12 @@ class AddRepoPlugin extends VGPlugin
 			 $this -> add_display_message("Error setting repository's description : ".$e->getMessage());
 			 return;
 		}
+
+		$cmd = "chmod g+rw -R $path";
+		exec($cmd,$out,$ret);
+		if ($ret !== 0) {
+			$this -> add_display_message("Error fixing repository permission. You may not be able to push in this repository.");
+		}
 		return True;
 	}
ViewGit