I'm a complete newbie in system administration and I'm doing this as a hobby.
I host my own git repository on a VPS. Let's say my user is john.
I'm using the ssh protocol to access my git repository, so my url is something like
Root is the owner of everything that's under
I'm attempting to give read/write access to john to everything which is under
I've tried both
setfacl to control access, but both fail the same way: they apply rights recursively (with the right options) to all the current existing subdirectories of
/path/to/git/myrepo, but as soon as a new directory is created, my user can not write in the new directory.
I know that there are hooks in git that would allow me to reapply the rights after each commit, but I'm starting to think that i'm going the wrong way because this seems too complicated for a very basic purpose.
Q: How should I setup my right to give rw access to john to anything under
/path/to/git/myrepo and make it resilient to tree structure change ?
Q2: If I should take a step back change the general approach, please tell me.
Edit: The question was answered as is, but that was the wrong question. The right question would have been "How to configure a bare git repository on the server for use with ssh access ?". See my own answer.