I am trying to create a new directory.
Munch@DESKTOP-J0U63F0 MINGW64 /
$ ls
bin/ etc/ LICENSE.txt ReleaseNotes.html unins000.exe*
cmd/ git-bash.exe* mingw64/ tmp/ unins000.msg
dev/ git-cmd.exe* proc/ unins000.dat usr/
Munch@DESKTOP-J0U63F0 MINGW64 /
$ mkdir example
mkdir: cannot create directory ‘example’: Permission denied
I expected no error, and to be able to then type ls
again to view the new directory listing, and see "example" as one of the directories. See in video Prework: Git Bash Part 1 at 02:05. Instead I am getting the permission denied error. Why is my permission denied? And how do I correct this?
MINGW64 means a Git for Windows installation.
'/' means "where Git is installed (which could be in C:\Program Files\Git
, and C:\Program Files
itself could be restricted in term of modification)
Try:
cd
mkdir example
cd
will take you to $HOME
, which is by default /c/Users/<YourLogin>
: you can write there.
Upon speaking with a coder friend of mine, apparently on Windows 10, on my new laptop my primary account is not automatically set to run programs as administrator by default. I simply had to right click on the program and click "run as administrator". Once I did that, I was able to use the mkdir input as desired.
See this link for more info on the subject of default running programs as administrator: https://www.cnet.com/how-to/always-run-a-program-in-administrator-mode-in-windows-10/
Thanks all for your answers/input!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With