Bash in Windows 10 - Directories not appearing when created in File Explorer

1

1

Using Windows 10 Enterprise Insider Preview Buil 14372.rs1_release.160620-2342

When I create a directory in Bash (e.g. mkdir test_from_bash) it appears in the File Explorer but the opposite doesn't work. File Explorer->New Folder (call it 'test_from_gui') then running ls -al in Bash does not show the new directory.

I don't think this is a permissions problem since I went into the Properties->Security section for each directory using the File Explorer and both of the aforementioned directories both have every box checked except for 'Special permissions' at the bottom of the list.

Is this a bug?

s g

Posted 2016-07-26T21:12:22.677

Reputation: 552

Answers

1

This is normal, according to the official WSL blog:

Interoperability with Windows

While VolFs files are stored in regular files on Windows in the directories mentioned above, interoperability with Windows is not supported. If a new file is added to one of these directories from Windows, it lacks the EAs needed by VolFs, so VolFs doesn’t know what to do with the file and simply ignores it. Many editors will also strip the EAs when saving an existing file, again making the file unusable in WSL.

Additionally, since VFS caches directory entries, any modifications to those directories that are made from Windows while WSL is running may not be accurately reflected.

To access Windows files from WSL, you'll need to go through /mnt/c/Users or such.

user1686

Posted 2016-07-26T21:12:22.677

Reputation: 283 655

Has anything changed with this ? Is there a way / hack to make the files visible as this is really inconvenient. – Kraang Prime – 2017-01-07T17:38:31.503

0

I've found an average workaround solution in the meantime.

1) Create files in bash eg: nano test.php

2) Edit test.php in Windows notepad, make changes and save

3) File is accessible in bash.

genuineLeather

Posted 2016-07-26T21:12:22.677

Reputation: 1