问题
When doing a git clone git://github.com/blasto333/PHP-Point-Of-Sale.git on one server the files permissions are (I am showing one file but it is like this for all of them):
-rw-r--r-- 1 chrism chrism 3297 Apr 1 19:12 index.php
On the second server it is:
-rw-rw-r-- 1 rrdiaper rrdiaper 3297 Apr 1 19:14 index.php
On a third server it is:
-rw-r--r--@ 1 cmuench cmuench 3297 Sep 17 2010 index.php
The 2nd server is complaining because the file is group writable (php suExec). I know I can fix it with a chmod -R 644, but I would rather understand why permissions are different.
回答1:
Check your umask. http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html
回答2:
I dont know, how you can find it out, but I assume, that on the second server the repository is created with --shared=group. This will (as it suggests) make the repository shared with the group and so it sets the appropriate settings, that allows users in the same group to push to the repository.
来源:https://stackoverflow.com/questions/5519864/git-clone-produces-different-permissions-on-different-servers