Software⏱️ 3 min readπŸ“… 2026-06-11

How to Fix: Git clone: error: chmod on <ntfs mount> failed: Operation not permitted

Git clone error on NTFS mount: Operation not permitted due to file system permissions.

Quick Answer: Use the --bare option with git clone to avoid chmod, or use a different repository location with proper permissions.

Git clone is failing on a dual-boot system with Fedora and Windows 7, due to an NTFS mount with restricted permissions. The error message indicates that Git cannot change the mode of the .git/config.lock file on the cloned repository.

This issue can be frustrating for developers who need to access their projects on both Linux and Windows systems. However, by following these steps, you should be able to resolve the problem and successfully clone your Git repository.

πŸ” Why This Happens

  • The primary cause of this error is that the Git repository is being cloned onto an NTFS mount point with restricted permissions. The .git/config.lock file requires write access to the parent directory, which is denied due to the restricted permissions.
  • Another possible reason for this issue could be if the Git repository has specific permissions or ownership settings that prevent the cloning process from working correctly.

πŸ› οΈ Step-by-Step Verified Fixes

Using a temporary directory

  1. Step 1: Create a new, empty directory on the Linux system to serve as a temporary location for the cloned repository. This will allow you to bypass the NTFS mount point and avoid permission issues.
  2. Step 2: Run the Git clone command using the temporary directory: `git clone ~/myproject/ /tmp/myproject`
  3. Step 3: Once the cloning process is complete, move the cloned repository from the temporary directory to the desired location on the NTFS mount point: `mv /tmp/myproject /transfer/`

Using a workaround (not recommended)

  1. Step 1: Use the workaround mentioned in your example, but be aware that this is not an ideal solution and may cause issues with the cloned repository.
  2. Step 2: Run the Git clone command using the temporary directory: `git clone ~/myproject/ /tmp/myproject`
  3. Step 3: Move the cloned repository from the temporary directory to the desired location on the NTFS mount point: `mv /tmp/myproject /transfer/`

πŸ’‘ Conclusion

By following these steps, you should be able to resolve the Git clone error and successfully access your project on both Linux and Windows systems. Remember to use a temporary directory or consider alternative solutions if the NTFS mount point has restricted permissions.

Did this fix your problem?

If not, try searching for specific error codes.

πŸ” Search Error Database

❓ Frequently Asked Questions