I have set up a gitolite repo on a ubuntu server which is intended to have developers clone/push projects we will be working on. I'm having a problem with the post-receive hook I have in a repo. I have a post-receive hook in a particular repo checking out to a particular directory on the server, in my case is /home/user/www/projects/. The problem is When an admin pushes a repo (git push origin), the hook checks out the project to the specified directory successfully and changes the permissions on the directory (project) being checked out. However, if a regular user pushes to the repo, then the the hooks checks out the project intact without changing permissions. I already checked umask on the server which is 0002 and it shouldn't be the issue here. I'm uninstalled and reinstalled gitolite but still having the same issue.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…