Updated: 22 October 2026 · Applies to: Git on any Linux server
If git pull changes your files' permissions on the server, it can break writable-group permissions and even produce a 500 Internal Server Error on the site.
1. Stop Git from tracking file-mode changes
git config core.fileMode false
Note that it is fileMode, case-sensitive.
Or edit the repository's config file directly:
cd /path/to/repo/.git nano config
Find the [core] section:
[core] repositoryformatversion = 0 filemode = false bare = false
Set filemode to false if it is currently true, and save the file.
2. If the problem persists, check your umask
umask
If this returns 0002, change it to 0022 for the current session:
umask 0022
To make this permanent (umask resets on every new login otherwise), edit ~/.bashrc:
vi ~/.bashrc
Add or update this line:
umask 022
Save the file; the new umask applies from your next login onward.
A umask of 0002 leaves new files group-writable, which is normally fine for a shared project directory but can let a deploy or pull operation leave files writable by more than just their owner on a web server, which is what triggers the writable-group permission errors and occasional 500 responses this article started from. Setting 0022 removes group write access from newly created files by default, which is the safer default for most single-user web hosting accounts.