Skip to content
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

file created on window side are not seen in Linux side #45

Closed
fdu123 opened this issue Apr 7, 2016 · 30 comments
Closed

file created on window side are not seen in Linux side #45

fdu123 opened this issue Apr 7, 2016 · 30 comments
Labels

Comments

@fdu123
Copy link

fdu123 commented Apr 7, 2016

Create a file with Notepad in C:\Users\xxx\AppData\Local\lxss\rootfs\tmp

File created can be displayed in Exporer
but it doesn't appear in linux
root@localhost:/mx6# cd /tmp
root@localhost:/tmp# ls
root@localhost:/tmp#
... nothing ...

even if I reboot my system
Regards,

@crutchcorn
Copy link

Have you tried ls -a?

@fdu123
Copy link
Author

fdu123 commented Apr 7, 2016

Yes of course
Regards,

@mphaney
Copy link

mphaney commented Apr 7, 2016

While this is an interesting phenomenon, should probably take note of the comment by @bitcrazed on issue #44 , to paraphrase: manipulating the Linux filesystem from Windows may cause issues/corruption and should not be done.

@bitcrazed
Copy link
Contributor

This is known and expected - please don't modify the "Linux filesystem" from Windows - here be dragons!

@cosmicdan
Copy link

This is interesting. Since we can't use Unix style permissions on the Windows mounts, how is one supposed to transfer and share data between the Linux and Windows environments? We're forced to manually cp back and forth from ~ to /mnt/*/?

Wouldn't it be at all possible in future to have newly placed files from the Windows host side inherit it's parent permissions? As someone who uses Samba to share data on a virtualized Ubuntu OS right now, this is fairly disappointing to hear.

@NiclasLindgren
Copy link

You did show on the demo of bash that we have full fidelity of the filesystem between the two subsystems, and now you say it isn't so. It would be great with the guidance on how we are meant to use this. On the demo you mentioned that you can use any editor to edit file under the Linux sub system and was one of the pitches.

@jdmarch
Copy link

jdmarch commented May 17, 2016

I'm not sure what the issue-handling norms are on this project, but closing an issue without solving it would seem to imply "won't fix", which, in turn, would seem to render the bash-on-windows feature almost pointless. Understood that this is in beta, and that patience is in order. But not on the roadmap? If normal cross-OS file write will always be not only unsupported but potentially destabilizing, then what's the point?

@sunilmut
Copy link
Member

Interoperability is a big topic and something that we are well aware and conscious about. We understand the frustration here from lack of full interoperability and appreciate all the feedback. For the first beta release, our focus was delivering a strong developer focused scenario. Having said that, we do provide some basic interop today in terms of access to Windows volume through WSL.For the next release, we will be taking all of this feedback into account and try to incorporate in our planning. To help us prioritize for future release, please also provide this feedback through our User Voice Page.

Regarding the topic of destabilizing, while it represents the current affairs, it is not an indication of the future state of the project. Please bear with us while we iterate on the project in its beta phase.

@jdmarch
Copy link

jdmarch commented May 17, 2016

Thanks, @sunilmut . Happy to be patient in the service of future progress! Could you explain, though, what developer-focused scenario you have in mind with the current capabilities? The primary one that occurs to me is being able to use git properly on a Windows machine, and that seems sketchy at present.

@sunilmut
Copy link
Member

@jdmarch - Here is what we have focused on for this release. But, let that not limit your WSL playground area and do give us feedback on other areas as well. It is mostly useful for setting expectations.

@JSMike
Copy link

JSMike commented Jun 1, 2016

confirmed that when using mklink /J to create a windows link to the Lxss/rootfs path, files could be updated but newly created files weren't visible in WSL.

@pavelbulanov
Copy link

pavelbulanov commented Jul 15, 2016

For records, adding link to user voice for the issue on this specific topic for people to vote up

@Manouchehri
Copy link
Contributor

@bitcrazed Have you considered using UnionFS? https://github.com/rpodgorny/unionfs-fuse

@ramses0
Copy link

ramses0 commented May 1, 2018

How does one go about determining whether this behaviour is "buggy" or not? As it stands, the current integration behaviour is "unexpected" at best, and by reasonable people would be considered "buggy" regardless of status in the bug tracker.

Can someone please positively or negatively confirm that this behaviour is still: "Working as Designed, WONTFIX"?

@therealkenc
Copy link
Collaborator

Can someone please positively or negatively confirm that this behaviour is still: "Working as Designed, WONTFIX"?

If you mean mucking with C:\Users\xxx\AppData\Local\lxss\rootfs\ or C:\Users\xxx\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\, that's a negatory. Blog post is here.

You can, however, modify files in /mnt/c (DrvFs) with impunity.

@Cyan101
Copy link

Cyan101 commented Aug 4, 2018

In this case how should we go about editing/creating files? I don't really wanna have to create/edit stuff in my bash, would much rather use my IDE

@bitcrazed
Copy link
Contributor

@Cyan101 The recommendation as per the blog post covering this issue (Do not change Linux files using Windows apps and tools), is to create your project files under <drive>:\<path> which is thus reachable from Linux via /mnt/<drive>/<path>, e.g. c:\dev\project1 --> /mnt/c/dev/project1.

@cosmicdan
Copy link

Eh, you guys would all be better off running Linux in Hyper-V (assuming you're on Windows 10 Pro) for now - if you're not interested or able to directly contribute to the WSL project. It's pretty good, much faster than VMWare or VirtualBox since MS added the whole Enhanced Linux Guest stuff :D

@alonbl
Copy link

alonbl commented Mar 8, 2019

Unbelievable!

Even cygwin has done a better job.

I thought I will drop cygwin and msys for our users and replace them with the WSL, but it seems like WSL and Windows have not been integrated properly as other tools.

@cosmicdan
Copy link

cosmicdan commented Mar 8, 2019 via email

@jdmarch
Copy link

jdmarch commented Mar 8, 2019

@alonbl worth noting --
https://blogs.msdn.microsoft.com/commandline/2019/02/15/whats-new-for-wsl-in-windows-10-version-1903/

What’s new for WSL in Windows 10 version 1903?
The next Windows update is coming soon and we’re bringing exciting new updates to WSL with it! These include accessing the Linux file system from Windows,..
Accessing Linux files from Windows
In the past, creating and changing Linux files from Windows resulted in losing files or corrupting data. Making this possible has been a highly requested and long anticipated feature. We’re proud to announce you can now easily access all the files in your Linux distros from Windows.

@DipanshKhandelwal
Copy link

I cannot access the file now. Is there any way I can delete that file?

@cosmicdan
Copy link

cosmicdan commented Aug 3, 2019 via email

@sanderjo
Copy link

sanderjo commented Jan 20, 2020

You can, however, modify files in /mnt/c (DrvFs) with impunity.

Ah, that works for me: files created on Windows, are visible on Linux via /mnt/c/

@vonamord
Copy link

when I "ls" on "mnt" it shows such background that hides all the directories. any ideas how to fix it?
image

@bitcrazed
Copy link
Contributor

@vonamord I am guessing your color theme uses a white font on a light background. Try setting a dark theme.

@jt-github
Copy link

jt-github commented Jun 19, 2020

For those who are stumbling on this because it's high up in search results, here's the short version:

  • You still cannot access the files directly by touching things via C:\whatever\yourdistro\rootfs
  • You can, however, access the root directory via \\wsl$

Refer to the comment from @jdmarch for a link to all the details.

@Cloudmersive
Copy link

I can't believe this is not getting fixed. The whole point of WSL is that you can modify the linux file system from Windows!

@cosmicdan
Copy link

I can't believe this is not getting fixed. The whole point of WSL is that you can modify the linux file system from Windows!

But it has been fixed, read previous comments. I had personally enabled automount and metadata of C drive, but this will add some minor IO overhead I imagine (nothing serious for an SSD, surely).

@therealkenc
Copy link
Collaborator

But it has been fixed

It had, but note as of this writing #4064 (message) is open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests