You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your Windows build number: Microsoft Windows [Version 10.0.17134.165]
What you're doing and what's happening:
Writing to an existing file inside the rootfs folder on Windows using any editor causes, upon reboot, the file to have permissions ---------- inside bash.
What's wrong / what should be happening instead:
Saving ontop of an existing file in Windows should honor existing unix permissions, or at least set to the default (u=rw,go=rw), rather than corrupting the record.
Running chmod u=rw,go=rw repro.txt fixes the issue, but only until a subsequent write by Windows + reboot.
Repro:
(bash) $ touch ~/repro.txt
(bash) $ ls -l ~/repro.txt
-rw-rw-rw- 1 leo leo 0 Jul 18 10:38 repro.txt
(windows) open file in notepad, save some contents.
(reboot)
(bash) $ ls -l ~/repro.txt
---------- 1 leo leo 20 Jul 18 10:27 repro.txt
(bash) $ cat repro.txt
cat: repro.txt: Permission denied
(bash) $ stat ~/repro.txt
File: 'repro.txt'
Size: 20 Blocks: 0 IO Block: 4096 regular file
Device: 2h/2d Inode: 3096224744134491 Links: 1
Access: (0000/----------) Uid: ( 1000/ leo) Gid: ( 1000/ leo)
Access: 2018-07-18 10:38:28.281263500 +0100
Modify: 2018-07-18 10:44:06.896765900 +0100
Change: 2018-07-18 10:44:06.896765900 +0100
Birth: -
Note that
This seems to happen independently of where in the subsystem the file is located
This seems to happen independently of which editor is used on Windows to save the file
This does not occur if the file is merely opened and not saved in Windows; it is the save action that seems to cause this bug.
It is just as reproducable with all antivirus controls disabled
The text was updated successfully, but these errors were encountered:
Long answer: Modifying Linux files using Windows tools is still not supported. Biggest reason being that the vendors need to modify their apps to accept the metadata feature Windows offers in builds 17134+. VSCode has a PR stuck that would fix the issue if that helps. Forget issue number on their repo but you can find it easily enough filtering with "WSL" as the search criteria. Basically alternate streams need to be supported in order for a tool on Windows to support Linux file metadata.
Short answer: There's no WSL actionable here. You can preserve Linux permissions on Windows directories using the metadata option and use wsl.conf to make it permanent. Same goes with case sensitivity if you wanted that as well.
Your Windows build number:
Microsoft Windows [Version 10.0.17134.165]
What you're doing and what's happening:
Writing to an existing file inside the rootfs folder on Windows using any editor causes, upon reboot, the file to have permissions
----------
inside bash.What's wrong / what should be happening instead:
Saving ontop of an existing file in Windows should honor existing unix permissions, or at least set to the default (
u=rw,go=rw
), rather than corrupting the record.Running
chmod u=rw,go=rw repro.txt
fixes the issue, but only until a subsequent write by Windows + reboot.Repro:
Note that
The text was updated successfully, but these errors were encountered: