views:

20

answers:

1

I have a whole bunch of git repositories in /srv/git manually administrated (not using gitosis), which I have obviously buggered up the permissions for, since I now get error: failed to push some refs to type errors, after some poor chmod invocations on the server.

I also mistakenly added +x to all hooks and I need to remove that and add them back manually by hand I suspect.

How does one reset a /srv/git directory to default git init --shared type permissions on all the repositories contained within?

A: 

I've found the following commands seem to restore some sanity.

find /srv/git -type f -exec chmod 664 {} +
find /srv/git -type d -exec chmod 2775 {} +

Obviously I need to fix the hooks still.

hendry