mkdir doesn't work when I'm in my documents, but does work when I'm in C:/

时间秒杀一切 提交于 2021-01-29 08:17:34

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!