-
Notifications
You must be signed in to change notification settings - Fork 814
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
Zone.Identifier Files when downloading from Windows to WSL file structure #7456
Comments
Is there a workaround for this? |
I usually use VS Code and is connected to my WSL. Instead of directly downloading the files from the browser to WSL, I download to windows, open the WSL folder in VS Code and then drag and drop the files from windows to VS Code. This seems to not bring the Zone.Identifier files. |
That's another step though, I think deleting the zone identifier file is less work since you only have to delete it at the end of your work, not every time you download. You can technically even keep it and just add it to .gitignore but it would be cool if you could disable generating the file completely, or just not generate it if it's empty anyway |
I can confirm this issue still exists on Windows 11, even though it was supposed to be fixed. Steps to reproduce are
|
I'm also still seeing this in Windows 11, any time I download a file and copy it over to WSL via File Explorer, along comes a |
As the filer of the original issue, I can confirm this is still not fixed for either Windows 10 or Windows 11.
|
Problem arised for me when I went from my Windows 10 Pro N to a clean install of Windows 11 Pro N. I thought the issue was me switching my daily driving wsl distro from Ubuntu to Manjaro but after installing Ubuntu, the problem is also there. So the culprit must be my new Win11 install. I could spin up my old Win10 to see what were my config (I'm pretty sure Windows Defender was deactivated). I had to activate TPM for Win11, other than that my hardware stayed the same. Let me know if replugging my Win10 drive to test and gather the config differences is something that could help. Side note: ZoneIdentifier files are also created when copying from Manjaro to Ubuntu via explorer.exe. |
Having this problem in Windows 10 Pro. Copied a file from one File Explorer window to another, where the first one was my Downloads directory on the Windows side and the second one was a WSL 2 directory. I was able to delete the file via VS Code's GUI after I closed all my File Explorer windows (before closing them, it said "this file is in use" etc). I wasn't able to delete the file from the WSL 2 terminal. It was as if the WSL 2 terminal couldn't target the file using the |
It's funny how the original issue was closed as "fixed" when the supposed fix never landed outside of insider/preview builds. |
Still happens here as well, on Windows 11 |
The Zone.Identifier file has host and referer urls, which can contain query string access tokens. While any decent web service should expire tokens, potentially having plaintext credentials lying around in files is... a little dodgy. Would be nice for this to be resolved. |
This issue also happens on my Win 10 build 19042 & WSL 2 running Ubuntu. |
The issue still persists on Window 11 21H2. |
Can confirm, happens on: Edition Windows 11 Pro Downloading a file from Microsoft Edge directly to the WSL location or copying it from Downloads does the same thing for me. |
Confirm. Happen to me with Windows 10 Pro and WSL2 |
Can confirm on
Only way I've found to move/copy files to WSL without getting Zone.Identifiers is my moving/copying from within WSL ( |
Can confirm the issue on:
|
Can confirm the issue on: Windows 11 Pro WSL Ubuntu release: 20.04 |
Present in Windows 10 21H1 with WSL2 |
Can confirm the issue on:
|
@HakuOTR I would just give it some time. Hopefully they will fix it soon. We ended up going with the (M1 based, this year) Macbook Pro again. I could not even attempt to justify anything else, considering I have to support my developers. WSL is still proving to be far too immature. It is getting close, however. Maybe one day. Please note that the majority of my folks would love to run Windows with a WSL2 dev environment, but it has to work, right now the list of bugs is long, and the patience is short. We still don't have systemd support, for example, and that isn't even remotely an issue that is a blocker for us. The blockers?
I wish everyone the best of luck. |
you can sudo find . -name "*:Zone.Identifier" -type f -delete |
2022-05-25 Win11 Pro Insiders 25120rs_prerelease.220513-1246 Problem still persists. 😢 such a pita to have to delete 2 files for every 1 file copied. |
this issue causes files that if are uploaded by accident can cause builds to fail in CI/CD |
Turning off "preserve zone information in file attachment" seems to have stopped the zone.Identifer files being created when I copy-paste into a WSL folder Open gpedit.msc
|
I've done this but WSL is still creating the |
How difficult is it for Microsoft to address this issue? It's been more than 4 years... |
They don't care. |
@darylknight Count me in for the beach house 👯 |
In my opinion it is not the problem of Windows. Windows creates those files for every file downloaded from the internet by default using NTFS's Alternate Date Stream, so you don't see it in Windows native directories (but they are still there!). |
This was my solution, can recommend. The .vhdx image can be mounted pretty easily with nbd on linux so you can move your work over no problem. |
Disable via Group Policy Editor
|
Indeed it's not a windows issue, and it's not an ext4 issue, everyone is behaving as they should. However it's a very annoying WSL issue for most users so it doesn't mean a solution should not be found. Even if it's opt-in (for those users who for some reason would rely on seeing these files in WSL) and a workaround. It could just be an option to automatically ignore the zone.Identifiers file whenever you copy to a WSL mount. |
Zone files don't get created in FAT drives when you copy files to them, so the correct implementation would not create zone files in any filesystem that doesn't support them including ext filesystems. Whether you consider a bug in Windows Subsystem for Linux to be a Windows issue or not is pretty irrelevant. |
Does not work for me |
This was working correctly for a bit with policy editor but now is again not working. W11 |
Not working either. W11 |
The posted solution of changing attachment manager setting does not work. Also checked the registry and I do have the value suggested there. How is there no solution to this yet? Nearly a 3 year old problem. |
We can start organizing the birthday party for this issue. The date is coming! 🎂😅 |
I'm tired and went back to macos 🤣 |
What seems to work is: After that, I restarted explorer.exe and at least I'm not getting the Site.Identifier files anymore when I copy files to the WSL file system. Haven't tried downloading files yet, but it seems to do the trick or is at least a good start. |
This did not work for me despite i followed each step, even retried with wsl$ Still getting Zone_Identified files when i copy files into wsl$ folders from explorer. |
It issue is really so complex to sove or just miss people to contributing? |
Same issue! this keeps breaking scripts and github. workaround are not working |
I see issues in both directions:
|
Unfortunately, these steps had no impact for me in Windows 11 Pro with all the latest updates (not including previews).
|
I was on 2.1.1.0.. updated to the same version numbers above.. And i confirm it no longer creates site.identifier files when copying files into the wsl filesystem from explorer windows.. . Thank you @NeuralClone ! |
@tolgaulas If we're running the same versions of everything above and have different results, it makes me wonder what's different between our systems. I've tried restarting explorer.exe multiple times and rebooted Windows a few times just to be safe. I'm still getting the identifier files when copying from Windows to WSL. I don't have the opposite issue, though. I can copy files from WSL to Windows without the files being generated. So, that's good at least. |
No no. My first report was based on 2.1.1.0 and then updated mine to match yours and it worked on me. I thought you were not getting them.. but it worked on me.. strange indedd. |
Oh ok. Gotcha. Unfortunately, I am indeed getting the files with the versions mentioned above. It's very strange that you upgrading to the same versions as me solved it for you. I'm glad it's working for some, though. |
|
I just created alias called dzi with the command
so easy to remove them when needed |
This worked for me:
Now browsers don't add the ZoneIdentifier stream for new downloads anymore. If it does not work for you, there is probably some other security configuration or version-specific bug that forces this feature. |
I tried this. I didn't try to download something from browser but when I try to extract from zip (winrar) to wsl location, it still creates the zone identifier files :( |
Is there an official explanation of this highly annoying issue? It's been years with no Microsoft feedback whatsoever |
When downloading a file from an online source lets say this image or a zip folder and directly saving it to the WSL file structure using the Microsoft Edge 'save as' option ( I have turned off the default download location so edge asks me every time where I should save something downloaded), when the download is complete I see these Zone Identifier files.
I read about a similar #4609 issue and from what I understand is that these files shouldn't be downloaded or should be removed after download.
My Ubuntu specifications :
My windows :
The text was updated successfully, but these errors were encountered: