-
Notifications
You must be signed in to change notification settings - Fork 822
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
No way to override uid mount setting? #4954
Comments
I think I know what might (?) be happening here. I get nonobvious behavior if I don't In other words, if you do your OP |
I forgot I already had automount settings in wsl.conf. I unmounted C: and rebooted my computer, but that didn't fix things. The settings in wsl.conf included UPDATE: Never mind, I rebooted again (after unmounting C: again) and the problem is back. Here are the contents of
So what's the real culprit? umask, fmask? |
You don't have metadata in the options. The default is no metadata. |
D'oh! Updated wsl.conf, will unmount and reboot later, let you know how it goes. |
Can confirm that it's fixed now. Thanks! |
Please use the following bug reporting template to help produce issues which are actionable and reproducible, including all command-line steps necessary to induce the failure condition. Please fill out all the fields! Issues with missing or incomplete issue templates will be closed.
If this is a console issue (a problem with layout, rendering, colors, etc.), please post to the console issue tracker.
Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to [email protected]. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump".\
See our contributing instructions for assistance.
Please fill out the below information:
Your Windows build number: (Type
ver
at a Windows Command Prompt)10.0.18363.693
What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
sudo mount -t drvfs C: /mnt/c -o metadata,uid=1000
cd /mnt/c
sudo touch test.txt
stat -c '%u' test.txt
Output:
1000
What's wrong / what should be happening instead:
Output should be:
0
(root)Strace of the failing command, if applicable: (If
some_command
is failing, then runstrace -o some_command.strace -f some_command some_args
, and link the contents ofsome_command.strace
in a gist here).For WSL launch issues, please collect detailed logs.
I admit I'm not sure whether this is a bug or if this is how it's supposed to be, but it just seems wrong that not even the root can override the mount settings for uid. This creates problems for processes in WSL not owned by user 1000 that access the Windows file system, e.g., a web server process running as another user with a virtual host located on the C: drive can't create files that are owned by itself, they're always owned by user 1000. If this is how mounting with a specified uid is supposed to work, then why do it in the first place? Might as well go back to how it was before the feature was added. Unless, of course, there's some setting or option I'm just not aware of that can allow exceptions?
The text was updated successfully, but these errors were encountered: