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 copying from Windows to WSL filestructure #4609
Comments
Can't repro here. This is on 19002; whether the small version bump makes a difference I doubt. Zone.Identifier does get a quick search hit. Said functionality is news to me. On a lark, from your WSL2 bash prompt, what is the output of:
|
I can reproduce with both WSL1 and WSL2 at 19002. |
@therealkenc For the output of your powershell grep: Also, I've been experiencing this for many versions/months, so it's not something that was introduced as of recent. |
@0xbadfca11 Regarding your link to the azure windows documentation, I have no Attachments key in |
I didn't configure anything "special" in my policy (almost never do as a rule) but copying the file didn't produce the artifact. It does for you and 0xbadfca11. I suppose the experiment to try is drag a file out of Downloads and onto some Windows share on some other computer on your local network (or a VM). If that Zone.Identifier file also appears in a "normal" network share scenario then this smells by-design-Windows. I think (?) the variable here might be in your step (1) "Download a file from an online resource into a windows folder". You didn't say how. I used Chrome, but it could have been |
@therealkenc Here's the steps I take exactly, using Firefox (reproduced on Chrome):
Here's my output from
|
Thanks for the detailed steps. Caught it; same repro, Below seems to be a hint. "This file came from another computer and might be blocked to help protect this computer." Clicking that "unblock" button cures. Which puts this (rather unfortunately) in by-design territory, and worse, out-of-scope WSL territory. |
I would argue that having extraneous files pop into existence every time something downloaded is copied over to the WSL filesystem should be classified as a bug and not by-design. Since these .Identifiers are quite useless once they get moved WSL, why not simply ignore the NTFS alternate file stream data during the copy process between file systems. This issue definitely has caused me a bit of pain when I download zipped directories and bring them over to WSL, leading to a proliferation of dozens of .Identifier files. This command (PowerShell) lists all files with an associated Identifier stream in a directory: This is how you remove them with PowerShell: If PowerShell has the tools to remove these stream identifiers, why can't WSL remove them upon file copy over? |
Likely because WSL doesn't have the faintest idea whether (scare quote) "those files" should be copied or not. Also because axiom that if the word "simply" is evoked, the premise is near always incorrect.
Me too; although someone on the some team somewhere at MSFT thought "This file came from another computer and might be blocked" was a good idea. This all said, I did the experiment of copying the untrused (?) file onto a local share, and there isn't any "•Zone.Identifier" shenanigans. This issues hasn't been closed by-design. Someone over my pay grade would need to do that. If it were, you'd already know. |
Explorer is attempting to set the NTFS ADS and WSL is not handling this correctly. The 0x003A (colon) getting altered to 0xF03A (dot) sounds like text encoding or path sanitation gone awry. If this magic WSL$ share isn't going to support storing ADS, then it needs to drop the ADS requests altogether. Dumping files in the share is terrible UX, could affect disk space (Zone Identifiers are not the only items stored in ADS), and is useless busywork as neither Windows or Linux support this Stack from a
|
@therealkenc I've been getting this for months too, and I think I know why you are not getting any Zone Identifier file. If I copy and paste to a WSL2 folder, I won't see the identifier file yet. But if I go a folder up, then go back again to the original folder, I now see the identifier file. here's the video of what I'm seeing. I also want to add that I copied from a I'm using WSL2, and here's my build number. |
Yeah this is happening here as well, pretty annoying. |
I hope this gets fixed soon as it's really annoying when, like mentioned already, you copy a extracted zip file to the WSL directory |
@therealkenc hey there, 👋🏻. I was wondering if you are now seeing this a bug after I posted details on how to reproduce it to give you more context? If you can reproduce it, any chance we can label this as a bug? |
@therealkenc Please label as bug. |
I reproduced it in October, quoth "Thanks for the detailed steps. Caught it; same repro",
Precedent (for better or worse) is the dev responsible makes that call. My # 1529 was opened Dec 2016 and I only took the rare liberty of marking it as a bug in May 2018 (a regretful precedent). A personal favorite # 2779 managed to make it from Dec 2017 to fixedinisiders Sept 2019 with no bug tag at all (noting # 2779 was also a terrible UX). But in the interest of popular demand, sure. Noting the significance of the already-existing open status (and lack of by-design tag) on this issue is probably being underestimated, and the significance of the newly minted bug tag is probably being overestimated. |
@therealkenc Thanks! It helps externals a lot when it comes to badgering the folks responsible and shows up in quantitative reporting. |
Hey, @therealkenc thanks for adding the label. 👋🏻 I'm actually more interested if it's reproducible in your end, that way, everyone in this thread would be in agreement it is happening. It somehow giving a mixed signal that the bug is inconsistent. If it's consistent then it is going to be easier to debug. However, I would like to add by simply searching the Judging from the screenshot it seems tagging it as a bug, seems to work 😉 |
@thisguychris they reproduced it in this reply: #4609 (comment). Also said in their last reply. |
@Kai-Richardson my bad, I totally missed that, 🙏🏻 sorry about that @therealkenc |
A Workaround is to run |
I will not say this is a simple solution. It is a workaround for somthing we should not have in our linux files. |
An XML file got this identifier file:
niklas@Fractal:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
niklas@Fractal:~$ uname -a
Linux Fractal 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux |
Still a bug in Version 2004 GA, 19041.264. |
Having the same issue here. Help is welcome |
It's likely you just don't see them in file explorer, because they will only display when you have file explorer set to show hidden files. |
@drewstaylor It's already been confirmed as reproducible, you're responding to an old post. |
I'm not convinced that this is a bug. This is the expected behavior of the ADS when downloading to a Windows share where the filesystem isn't ntfs. You're interacting with the share if you're using windows explorer to download to a wsl path. You don't see this if for example you perform file operations from within wsl or curl, but that's also expected. If you really hate the existence of those files, don't drag and drop through explorer or copy into the share. Alternatively disable the preservation of zone data via local policy. I really don't see M$ making an exception for a "magic" share. The policy you want is User Configuration\Policies\Administrative Templates\Windows Components\Attachment Manager\Do not preserve zone information in file attachments (set it to enabled) |
@SheepReaper As mentioned in 2019, neither Windows or Linux support @bitcrazed Can you re-open and assist here? @therealkenc Can you re-open this? |
Ntfs supports Alternate Data Streams. https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/6e3f7352-d11c-4d76-8c39-2516a9df36e8 windows supports ADS. Explorer is sending all streams. The share fs (ext4) does not. Rather than losing information, the default behavior is to create the zone identifier file. Between wsl 1 and 2 the way to access your Linux file systems from windows was replaced with a normal Windows share. I don't know that this has ever worked the way you expect in wsl2. This is default behavior for ADS on windows... |
@SheepReaper I understand NTFS ADS (see posts I linked to), but my point is that after being copied into |
This wasn't happening for me for the first few months of using WSL 2, but then started happening just recently. Pretty annoying. Why was the issue closed if it's still an unfixed problem? |
@nathanneuro add your voice to #7456 |
This is clearly still an issue. Should I open a new bug report? |
@fonnesbeck No, there is already a new issue opened: #7456 |
@SvenGroot Can you please explain how come this issue is marked as fixed when in fact it's not? |
I also have the same problem and when trying to delete with the command |
Whatever filesystem you're working on appears to be mounted read-only. You won't be able to delete any files on it until you address that. @tomba4 It's the unfortunate nature of issue handling. Closed issues may as well be locked for all the attention they will get. There's already a new issue opened. Please go there and thumb up the OP to increase the visibility of the open issue: #7456 |
You don't have the correct command line, you need it like this: find . -type f -name "*.Identifier" -exec rm -f {} ; |
I've reformatted 3 times in the last month and followed the documentation for installing WSL each time. This still happens in Windows 11. |
This can also start happening after an update. But at least now you know to never upgrade WSL if you're not experiencing this issue. |
Still an issue here, very annoying :/ |
Same here |
Very annoying. Please provide an option to disable this "feature" from WSL. |
If you mount a volume formatted with NTFS, then save a file downloaded from the internet, through the wsl$ share, to a directory on the mounted NTFS volume, does it still happen? |
Can I just delete these files or should they not be deleted? |
@cianetech I think these files just contain information about where the file came from; you can delete them so long as you trust the files. I've never had an issue deleting them. |
You guys are probably all way too young. These minor inconveniences are mere trifles compared to what we had to put up with from the 90s until a year or so ago, since which we can boot to windows and we almost don't have to use it at all! |
same here please remove it linux do not care for these files |
This issue is no longer tracked. Please go to #7456 and upvote the OP there to gain attention. |
uname -a
produces: Linux 4.19.67-microsoft-standard #1 SMP Sun Aug 18 13:37:54 UTC 2019 x86_64 x86_64 x86_64 GNU/LinuxContents of the Zone Identifier file are as to be expected, my sample having the contents:
Image:

The text was updated successfully, but these errors were encountered: