I am using gitolite git server on a ubuntu linux server. I used a hook that will be called on every push and will update a server's directory(which include live site's source code).
Now, whenever I change something on my local pc and push the changes to server, the hook is being called and the pull request are being executed fine. But, problem is, the files which were updated, are now having changed permission. Like:
rwxrwxr_x (before)
rwx_____x (After)
After few searches, I did came up with this solution . I did tried it with both my global git config and repository specific config settings. after setting the config, whenever I am trying to push from my local pc, the same issue is happening again like above, thus seems, for some reason, the solution isn't working.
Does anybody have any idea, what can be the reason plz? Do I have to do anything additionally besides the config settings? Any suggestions are welcome. Thanks in advance.
As the OP Rana confirms in the comments, if the hook starts with:
It will generate files with the right protection.
Alan Thompson mentions: