Fix permissions for newly-created repositories
authorSteve McIntyre <smcintyre@aminocom.com>
Mon, 19 Oct 2009 16:20:21 +0000 (17:20 +0100)
committerSteve McIntyre <smcintyre@aminocom.com>
Mon, 19 Oct 2009 16:20:21 +0000 (17:20 +0100)
As seen in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544246

Newly-created repositories are not visible under gitweb or via git://,
as they are created with no access for anybody but gitosis. Creating
them with mode 0751 allows other users to at least see them.

gitosis/repository.py
gitosis/serve.py

index 092e41d..df4f0c1 100644 (file)
@@ -36,7 +36,7 @@ def init(
     if _git is None:
         _git = 'git'
 
-    util.mkdir(path, 0750)
+    util.mkdir(path, 0751)
     args = [
         _git,
         '--git-dir=.',
index d83b1d8..7e590b5 100644 (file)
@@ -139,7 +139,7 @@ def serve(
         p = topdir
         for segment in repopath.split(os.sep)[:-1]:
             p = os.path.join(p, segment)
-            util.mkdir(p, 0750)
+            util.mkdir(p, 0751)
 
         repository.init(path=fullpath)
         gitweb.set_descriptions(