-
Notifications
You must be signed in to change notification settings - Fork 832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mkdir: cannot create directory ‘a’: Permission denied #4836
Comments
Can you reproduce this when using C:\ instead? |
Same at |
Where did you get your Arch image? I have tried the one at https://github.com/yuk7/ArchWSL/releases and except for some issues with permissions on the package GPG signatures it worked well for me. |
I installed it using a guide from here https://github.com/DDoSolitary/LxRunOffline/wiki WSL works fine, exporting it to WSL2 and I have trouble with Will try your link for now. |
Give the other Arch image a try, I know it's a good image. What are the permissions in the folder what you are trying to create a folder? Have you tried chown? |
chown, chmod all works alongside touch, rm, rmdir, mv, etc. I just noticed mkdir wouldn't work when git clone gives me permission denied. Thanks for helping btw! Will try a clean image instead of exporting from one I currently have. |
I have the same issue, I am trying to create a directory so that I can mount the drive |
I delete a git dict in windows explorer, then mkdir failed in WSL terminal. |
I just upgraded to ubuntu version 2 and I'm getting the same issue. I can't mkdir on my drives in /mnt/c and /mnt/d, but it works fine in my home folder and other areas. All other operations work fine. Even running with sudo doesn't help. My app that I'm working on also can't create folders. |
In my case it was a mount issue, or at least changing the mount options fixed it. Running the following command from https://devblogs.microsoft.com/commandline/chmod-chown-wsl-improvements/ worked for me:
It's unclear but the command seems to be permanent. I'm not sure what happened during the upgrade from WSL 1 to 2 that affected this. |
Turns out my mount solution didn't last through a reboot, but the Full Control to users fixed it, thanks @stu85010. |
I have the same issue on Ubuntu 20.04.2 LTS. Besides other commands like touch and I/O redirection fail with the same error. Why it happens? Maybe this issue help. |
You have to launch Git Bash as an administrator. Simple as that, it helped me. |
try command |
Thanks, this worked for me |
you saved my life bro 😊😊😊 |
you saved my day 😊 thanks! |
|
Thanks for this brooo |
Worked amazingly for me! |
That looks less like a linux/system issue, and more like a Python issue for me...? |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Cannot create directory with
mkdir
even thoughtouch
,rm
,rmdir
,mv
all works fine.Microsoft Windows [Version 10.0.19546.1000]
Arch Linux distro created with
wsl --export Arch D:\arch.tar
wsl --import Arch2 D:\WSL\Arch2 D:\arch.tar --version 2
cd /mnt/d/
mkdir a
gives
mkdir: cannot create directory ‘a’: Permission denied
Works fine at home directory though
cd /mnt/c/Users/user
mkdir a
no problem here...
Where should I start to look for a solution for this?
The text was updated successfully, but these errors were encountered: