I'm trying to clone a git repo on a Windows mapped network drive under WSL (Windows Subsystem for Linux). The drive is a Samba share.
Windows version: 10.0.19044 WSL: Ubuntu 20.04LTS
fstab: V: /mnt/v drvfs rw,relatime,user,umask=000 0 0
$ sudo git clone https://github.com/google/googletest.git ./xxx
Cloning into './xxx'...
error: unable to mmap '/mnt/v/xxx/.git/config': Operation not permitted
fatal: could not set 'core.filemode' to 'false'
Permissions of /mnt/v/:
$ ls -la /mnt/v/
total 38912
drwxrwxrwx 1 root root 512 Feb 7 12:06 .
I have also tried:
sudo mount -t drvfs '\\samba\my-drive' /mnt/Vtest/
$ git clone https://github.com/google/googletest.git ./xxx
Cloning into './xxx'...
error: chmod on /mnt/Vtest/xxx/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'
Permissions of /mnt/Vtest:
$ ls -la .
total 38912
drwxrwxrwx 1 root root 512 Feb 7 12:06 .
And also tried:
sudo mount -t drvfs V: /mnt/Vtest/ -o metadata
$ git clone https://github.com/google/googletest.git .
Cloning into '.'...
error: chmod on /mnt/Vtest/delete/.git/config.lock failed: Operation not permitted
fatal: could not set 'core.filemode' to 'false'
Using sudo goes a bit further, but still fail:
$ sudo git clone https://github.com/google/googletest.git .
Cloning into '.'...
remote: Enumerating objects: 23828, done.
remote: Counting objects: 100% (286/286), done.
remote: Compressing objects: 100% (168/168), done.
fatal: Unable to create temporary file '/mnt/Vtest/delete/.git/objects/pack/tmp_pack_XXXXXX': Permission denied
fatal: index-pack failed
I have seen: Git init: fatal: could not set 'core.filemode' to 'false' and checked that no AV is scanning this directory.