Users run into the issue of .git changing their file permission on doing ‘git pull’ on server/remote machine.

This causes the issue with the writable group permission and might even give you Server Internal Error 500.

1) In case you want your GIT not to track the file permission changes, run the following command :

git config core.fileMode false
git init

Make sure it’s fileMode (case sensitive).

Alternatively, you can open your config file also :


cd goto/rootdirectory
cd .git
nano config

You will get something like this :

[core]
repositoryformatversion = 0
filemode = false
bare = false

Change your filemode to false if it’s true and save file.

 

2) In case still the issue persist, then it can be your ‘umask’ at fault.

Type command :

umask

If it returns 0002 , changing it to 0022 by tying command :

umask 0022

To changing the default umask (as it will get reset on every login to your server) , use following command:

$ vi ~/.bashrc

Append/modify following line to setup a new umask:
umask 022

Save file and you should be good to go.

Hai trovato utile questa risposta? 0 Utenti hanno trovato utile questa risposta (0 Voti)