-
Notifications
You must be signed in to change notification settings - Fork 812
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
Permission issue with read-only files in DrvFs-mounted network drives #12051
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
|
Attached logs: WslLogs-2024-09-18_13-47-58.zip For the record, this current behaviour breaks Git, which uses this file mode for the database, as evidenced by multiple issues reported elsewhere: |
The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running. Diagnostic information
|
Again, restarting the LxssManager service beforehand just in case: |
Diagnostic information
|
Seems the cause is WSL1 settings the Read-only bit while opening. If the file is first |
Windows Version
Microsoft Windows [Versión 10.0.19044.4894]
WSL Version
0.0.0.0
Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 4.4.0-19041-Microsoft ([email protected]) (gcc version 5.4.0 (GCC) ) #4355-Microsoft Thu Apr 12 17:37:00 PST 2024
Distro Version
Debian Bookworm
Other Software
No response
Repro Steps
Mount any network drive like so:
mkdir /mnt/nas mount -t drvfs -o uid=1000,gid=1000 '\\192.168.0.22\shared' /mnt/nas
Create a test executable that will write create and write to a file with 0444 permissions:
Expected Behavior
The file should be created and the handle is returned. This works in real Linux, and also when outside a SMB share.
Actual Behavior
The file gets actually created, but returns a -1 EACCESS. Furthermore, the file can not be deleted using "rm" (not even as root) unless the permissions are changed via a chmod. Despite metadata not being enabled, permissions are somehow still applied:
create-strace.log
rm-strace.log
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: