22

I would want to know what is this Git error at the start of Git bash ?

chmod: changing permissions of '/dev/mqueue': Permission denied
ln: failed to create symbolic link '/etc/mtab': Permission denied
'C:\WINDOWS\system32\drivers\etc\hosts' -> '/etc/hosts'
/usr/bin/cp: cannot create regular file '/etc/hosts': Permission denied
'C:\WINDOWS\system32\drivers\etc\protocol' -> '/etc/protocols'
/usr/bin/cp: cannot create regular file '/etc/protocols': Permission denied
'C:\WINDOWS\system32\drivers\etc\services' -> '/etc/services'
/usr/bin/cp: cannot create regular file '/etc/services': Permission denied
'C:\WINDOWS\system32\drivers\etc\networks' -> '/etc/networks'
/usr/bin/cp: cannot create regular file '/etc/networks': Permission denied
rm: cannot remove '/etc/post-install/01-devices.post': Permission denied
rm: cannot remove '/etc/post-install/03-mtab.post': Permission denied
rm: cannot remove '/etc/post-install/06-windows-files.post': Permission denied
rm: cannot remove '/etc/post-install/99-post-install-cleanup.post': Permission denied
Firmin Martin
  • 280
  • 3
  • 15
Omkar Mulick
  • 221
  • 1
  • 2
  • 6

4 Answers4

42

See https://github.com/git-for-windows/git/issues/1449. This happens when the post-install scripts fail to run for some reason.

Running Git Bash as administrator once triggers execution of those scripts and fixes the problem.

sur5r
  • 528
  • 4
  • 4
7

Yes, this happened to me after downloading Git for Windows 2.29.0, post-install scripts failed, and running it as admin once allows the chmod command to work and permanently fixes the problem! I would like to add: this may happen to every update that Git Bash has; you just have to occasionally run Git as administrator (right after finishing update) for the scripts to run!

4

Try to log in as admin in your bash to see if that solves your problem!

0

i installed git to VM linux, then i switched to my windows10 then i run the git bash, I have the same problem, then i run git bash as admin, and it fixed!