Git keeps changing my file permissions when on samba
Fixing these file permission changes
Actually it is not GIT that changes the files but samba.
When you checkout a a git repo in a samba-managed folder, some weird mask apply. In my case it was adding +x permission everywhere.
The solution is to turn off "map archive" in samba configuration, in the global space.
/etc/samba/smb.conf
map archive = no
Reboot system or restart samba
Source of knowledge : http://stackoverflow.com/questions/20958888/preserving-file-permissions-for-samba-shares-when-file-is-edited
Optional
To fully fully restart fresh - including file permission, erase everything but .git* directory, then restore files with git reset --hard :
$> rm -fr * $> git reset --hard
Recent Comments