Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It turns out that when you specify the <code>core.sharedrepository</code> config, git does <code>chmod()</code>s on the files it creates. That way, the result is correct despite filesystem types and mount options, <em>except</em> in your one case where the repository owner isn't a member of the group it's shared with.</p> <p>That bad result happens because git's <code>chmod()</code> appears to succeed -- you can see it in an strace -- but ignores anything the issuing user isn't authorized to ask for.</p> <p>So to avoid that weirdity, the thing to do is</p> <pre><code>git config --unset core.sharedrepository </code></pre> <p>(or not specify --shared at all on the init) so git doesn't touch the filesystem's default permissions at all. Amusingly enough that makes everything work:</p> <pre><code>~/sandbox/75276/s$ find ../s.git -ls 12193569 4 drwxrws--- 4 jthill mail 4096 Apr 9 13:52 ../s.git 12193571 4 -rw-rw---- 1 jthill mail 73 Apr 8 20:40 ../s.git/description 12193572 4 -rw-rw---- 1 jthill mail 23 Apr 8 20:40 ../s.git/HEAD 12721086 4 drwxrws--- 2 jthill mail 4096 Apr 9 13:52 ../s.git/objects 12193570 4 drwxrws--- 2 jthill mail 4096 Apr 9 13:52 ../s.git/refs 12193578 4 -rw-rw---- 1 jthill mail 104 Apr 9 13:37 ../s.git/config ~/sandbox/75276/s$ cat ../s.git/config [core] repositoryformatversion = 0 filemode = true bare = true [receive] denyNonFastforwards = true ~/sandbox/75276/s$ git push origin master Counting objects: 3, done. Writing objects: 100% (3/3), 198 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To /home/jthill/sandbox/75276/s.git * [new branch] master -&gt; master ~/sandbox/75276/s$ find ../s.git -ls 12193569 4 drwxrws--- 4 jthill mail 4096 Apr 9 13:52 ../s.git 12193571 4 -rw-rw---- 1 jthill mail 73 Apr 8 20:40 ../s.git/description 12193572 4 -rw-rw---- 1 jthill mail 23 Apr 8 20:40 ../s.git/HEAD 12721086 4 drwxrws--- 5 jthill mail 4096 Apr 9 13:53 ../s.git/objects 16777964 4 drwxrwsr-x 2 jthill mail 4096 Apr 9 13:53 ../s.git/objects/58 16777965 4 -r--r--r-- 1 jthill mail 17 Apr 9 13:53 ../s.git/objects/58/7be6b4c3f93f93c489c0111bba5596147a26cb 16777962 4 drwxrwsr-x 2 jthill mail 4096 Apr 9 13:53 ../s.git/objects/ab 16777963 4 -r--r--r-- 1 jthill mail 46 Apr 9 13:53 ../s.git/objects/ab/69b4abf3bb84d4e268bd42d84e4a9a5e242bd3 16777960 4 drwxrwsr-x 2 jthill mail 4096 Apr 9 13:53 ../s.git/objects/81 16777961 4 -r--r--r-- 1 jthill mail 120 Apr 9 13:53 ../s.git/objects/81/210f2df9629e5df5f6dfa0923a2cf72369314d 12193570 4 drwxrws--- 3 jthill mail 4096 Apr 9 13:53 ../s.git/refs 12193573 4 drwxrwsr-x 2 jthill mail 4096 Apr 9 13:53 ../s.git/refs/heads 12193574 4 -rw-rw-r-- 1 jthill mail 41 Apr 9 13:53 ../s.git/refs/heads/master 12193578 4 -rw-rw---- 1 jthill mail 104 Apr 9 13:37 ../s.git/config ~/sandbox/75276/s$ </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload