问题
I tried to make a new folder using de mkdir command in Git Bash
mkdir PetStore
and I get
mkdir: cannot create directory ‘petstore’: No such file or directory
And the only solution I find online is that I have to use -p because the parent directory doesn't exist, but it does. Doing this same command within C:\temp\ does work. So I'm assuming the problem has something to do with permissions.
What am I doing wrong?
note: Git Bash was running as administrator
edit: I'm using windows
回答1:
If ownership of the folder is your problem, here is a possible solution:
chown -R $USER:$USER folder
This will change ownership of folder
and its contents to your user.
来源:https://stackoverflow.com/questions/55040504/mkdir-doesnt-work-when-im-in-my-documents-but-does-work-when-im-in-c