Skip to content
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

CHMOD making incorrect permissions #2182

Closed
GFRoSTY opened this issue Jun 1, 2017 · 2 comments
Closed

CHMOD making incorrect permissions #2182

GFRoSTY opened this issue Jun 1, 2017 · 2 comments

Comments

@GFRoSTY
Copy link

GFRoSTY commented Jun 1, 2017

Hi Guys, firstly I'd like to say awesome job getting bash and Ubuntu working in win 10, BUT I seem to have an issue.

When I am, trying to set the permissions on a file using chmod it doesn't set the permissions as intended.
If I do this command on a true Ubuntu OS it works, as shown below...

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    10.0.15063

  • What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)

  1. I created a sample.txt file
  2. set 755 permissions on sample.txt file: 'chmod 755 sample.txt'
  3. ls -all to see permissions
  4. set 400 permissions on sample.txt file: 'chmod 400 sample.txt'
  5. ls -all to see permissions.

Then I did a compare doing the same on a true Ubuntu install and you can clearly see permission changes don't match.

Bash CLI
image

TRUE Ubuntu OS 17.x
image

PLEASE LOOK INTO THIS AS IT DROVE ME NUTS TRYING TO WORK THIS OUT as it caused a problem trying to ssh with private key files that were NOT permissioned as -r-------- when using the BASH on ubuntu in win10.

Keep up the development team !!!!

  • What's wrong / what should be happening instead:
    Permissions should be changed correctly

  • Strace of the failing command, if applicable: (If <cmd> is failing, then run strace -o strace.txt -ff <cmd>, and post the strace.txt output here)
    Command doesn't fail as such just doesnt do what it is supposed to

@sunjoong
Copy link

sunjoong commented Jun 1, 2017

@GFRoSTY - That's common misunderstanding of WSL :).

Files in DrvFS, i.e., under /mnt/<drive letter>/<dir>, does not have permissions that same as linux. So, just cd ~ before your test begin and then create test files in VolFS.

For more details, read DrvFs permissions section in https://blogs.msdn.microsoft.com/wsl/2016/06/15/wsl-file-system-support/ .

@GFRoSTY
Copy link
Author

GFRoSTY commented Jun 1, 2017

Hi sunjoong

I did cd ~ and then tested again and it now chmod 400 gives the correct permissions so I'll keep any eye out to make sure for true linux VoIFS mode when needed

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants