Menu & Search
“Config Lock Failed Operation not Permitted” – Git

“Config Lock Failed Operation not Permitted” – Git

I’ve encountered this error message when attempting to clone a git repo on a linked folder within WSL. This also happens on any mounted Windows drive when working with WSL

Cloning into ‘pw-iam’…
error: chmod on /mnt/c/projects/pw-iam/.git/config.lock failed: Operation not permitted
fatal: could not set ‘core.filemode’ to ‘false’

WSL Git Clone Linked Folder Error

I’m not sure of the fix. Perhaps if someone stumbles upon this post could let me know, otherwise, this isn’t much of use other than a note-to-self blog post.



  1. […] to a ‘projects’ folder in this post but I get an error when cloning git repos in them (chmod error). Using mounted Windows drives for version-controlled projects is appearing to be a no […]

  2. 7 months ago

    I would not attempt to use a windows file store for critical WSL2 files. As far as I know, there is no way to preserve the permissions needed by Linux in a windows file structure. A WSL projects folder connected to remote repos – is the best backup of that data. The whole instance of the distro can be backed up in a tar file that would preserve the file structures in the event you need to rebuild.