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 command has wrong permissions #1801
Comments
777 is the only default inside of windows directories when accessed through bash for windows. It should work fine if you make a directory inside of WSL. |
This is done through WSL. Note: |
If you create a directory inside the windows file system (anywhere in /mnt/c etc), it will have 777 as the file permissions because it is actually using windows file permissions. This is not a bug. If you redo the above inside of the WSL filesystem, you will create a directory as 755. |
If you tried this, I'd be interested to see what differences our systems have |
Your example specifically shows you creating a directory inside the windows file system, you can't blame me on that one. It seems it could actually be an issue though, I'd note that I've never noticed this happen to me so while i didn't actually go try it, directories i make inside of WSL seem to be fine. It's probably something to do with how it creates directories outside of its own filesystem, anyway. |
Other than that, it could just be incorrect masks in respect to the issue, notably in the referenced but the creator states that the directory is '755' but it's '775', which is still non standard. |
The VolFs issue sounds to me like #352 . If so, the workaround would presumably be to manually set your The DrvFs issue has been discussed on many tickets here, though at the moment I'm failing to find a single ticket to point at. No workaround at the moment, other than "use VolFs" :-) DrvFs simply doesn't implement permissions yet, so it exposes all files as world-writable and executable. |
The default umask on Ubuntu is 0222 (http://askubuntu.com/questions/44542/what-is-umask-and-how-does-it-work) Manually setting
|
@hughbe -- for the sake of clarity / future readers of this thread, could you please update your last post to note that you specifically tested DrvFs and not VolFs? The behavior that you are illustrating is as expected per other discussion on this ticket. |
@hughbe |
cd /home/a
mkdir myDir Should give correct file permissions as set by Your example makes a directory inside the Windows file system (DrvFs), which does not support full linux permissions. @aseering It seems that my umask by default was |
@aseering I see, will keep it in mind. |
The OP here was about DrvFs which doesn't support |
I think what everyone wants to know at this point is WHERE to set The improper settings BREAK things like oh-my-zsh, antigen, and other zsh stuff. An after-the-fact solution would be to run a Overall, it would be nice if WSL had the Because the next problem after that would be finding out why |
This thread was really confusing. It seems several people redirected here from other threads (though not OP) and I are experiencing the issue that even in /home/our_username, mkdir still makes with 777 permissions. umask returns 0000. Was there ever a clear answer to this @therealkenc ? |
Yeah there's a couple unrelated things going on here making it confusing. One is file permissions on DrvFs ( The other is the default |
It cannot work |
umask was 000 for me. Setting it to 022 in ~/ fixed things for me. |
The default
mkdir
setting creates a folder with Read, Write, Execute permissions for Owner, Group and World (0777).On other systems,
mkdir
creates a folder with Read, Write, Execute permissions for Owner and Read permissions for Group and World (0755).This caused test failures running the
https://github.com/apple/swift-llbuild
project (part of Swift.org)drwxr-xr-x 2 root root 0 Mar 23 16:35 foo
drwxrwxrwx 2 root root 0 Mar 23 16:35 foo
14393.953
mkdir foo
ls -l
N/A
N/A
The text was updated successfully, but these errors were encountered: