title: Prevent git from failing on filesystems without chmod permissions in Linux
body: <p>I am trying to initialize a git repro on a samba mount with very limited permissions.</p>
  
  <p>Trying to init I will receive:</p>
  
  <pre class="lang-sh prettyprint-override"><code>$ git init .
  error: chmod on /mnt/server/subfolder/.git/config.lock failed: Operation not permitted
  fatal: could not set 'core.filemode' to 'false'
  </code></pre>
  
  <p>Which is surprising as filemode is already globally set to false</p>
  
  <pre><code>$ git config --get core.filemode
  false
  </code></pre>
  
  <p>The Problem in general is that /mnt/server is a samba mount to a folder to which I have very limited access.
  Also I am not able to change any permission for the /mnt/server mount as I am working on shared server with on which several users need the access to the /mnt/server mount.
  So changing mounting permission like suggested <a href="https://superuser.com/questions/991832/git-clone-error-chmod-on-ntfs-mount-failed-operation-not-permitted">here</a> is not an option.</p>
  
  <p>Also creating a symlink like suggested <a href="https://subzerodays.wordpress.com/2018/11/21/creating-git-repo-on-ntfs-in-linux/" rel="nofollow noreferrer">here</a> does not work, as symlinks are not enabled on the samba drive.</p>
  
  <p>So the question is how to prevent git from failing a chmod error or prevent it from doing chmod at all?
  Is this possible?
  Or how do I init a git in the environment?</p>