I have a problem with Git. I searched for a solution in Google and in StackOverflow but nothing helps.
The problem is that every time git updates some file in the wo
It is kind of dangerous to allow file execution as a binary.
Anyway I solved the problem with umask. My post-receive
script looks like:
!/bin/sh
umask 002
GIT_WORK_TREE=/var/www/site git checkout -f
So, file permission
s set to 664
and directory permissions
set to 775
, which suits me perfectly.
P.S. Setting umask in a .profile
file of git
user has no effect, and I don't understand why, please comment out if you know why this happens.